@esri/solutions-components 0.10.2 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +2 -2
- package/dist/cjs/buffer-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-action-pad_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite-alert_4.cjs.entry.js +12 -10
- package/dist/cjs/calcite-block_5.cjs.entry.js +4 -4
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite-flow_6.cjs.entry.js +2 -2
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +5 -5
- package/dist/cjs/card-manager_3.cjs.entry.js +7 -6
- package/dist/cjs/{common-4d4cf291.js → common-61b41813.js} +1 -1
- package/dist/cjs/consent-manager.cjs.entry.js +2 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -6
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +2 -2
- package/dist/cjs/{downloadUtils-48ffc5b3.js → downloadUtils-b757205e.js} +5 -5
- package/dist/cjs/feature-list.cjs.entry.js +6 -6
- package/dist/cjs/{helpers-6f7660d4.js → helpers-1deec961.js} +1 -1
- package/dist/cjs/{index.es-9e361fa2.js → index.es-6c8b7d64.js} +5 -5
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-create.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-export-views.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-export.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-header.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-popover.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-splash.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +4 -4
- package/dist/cjs/{languageSwitcher-f0bb94fa.js → languageSwitcher-dc2dd354.js} +1 -1
- package/dist/cjs/{languageUtil-f22ce913.js → languageUtil-a3e1eafd.js} +1 -1
- package/dist/cjs/layout-manager.cjs.entry.js +2 -2
- package/dist/cjs/{loadModules-36d49819.js → loadModules-8567855e.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-2dc1252d.js → locale-4e7fe921.js} +1 -1
- package/dist/cjs/{locale-239118c6.js → locale-a1bcb6eb.js} +2 -2
- package/dist/cjs/map-select-tools_3.cjs.entry.js +40 -27
- package/dist/cjs/{popupUtils-b771f498.js → popupUtils-2b5ec788.js} +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +13 -10
- package/dist/cjs/{restHelpersGet-88ba0e25.js → restHelpersGet-bf484fda.js} +24 -20
- package/dist/cjs/solution-configuration.cjs.entry.js +6 -6
- package/dist/cjs/solution-contents_3.cjs.entry.js +6 -6
- package/dist/cjs/{solution-resource-16c7510c.js → solution-resource-57cf345b.js} +1 -1
- package/dist/cjs/{solution-store-747a28ab.js → solution-store-71bb46fa.js} +65 -58
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +4 -4
- package/dist/cjs/store-manager.cjs.entry.js +4 -4
- package/dist/cjs/{templates-2f44c01b.js → templates-e4b98319.js} +2 -2
- package/dist/cjs/{utils-e486aa01.js → utils-b43fe04f.js} +1 -1
- package/dist/collection/components/card-manager/card-manager.js +20 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +3 -22
- package/dist/collection/components/edit-card/edit-card.js +21 -2
- package/dist/collection/components/info-card/info-card.js +21 -2
- package/dist/collection/components/map-select-tools/map-select-tools.js +88 -21
- package/dist/collection/components/public-notification/public-notification.js +62 -5
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/utils/interfaces.ts +3 -0
- package/dist/collection/utils/pdfUtils.js +1 -1
- package/dist/collection/utils/pdfUtils.ts +1 -1
- package/dist/components/card-manager2.js +3 -1
- package/dist/components/crowdsource-manager.js +3 -5
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/edit-card2.js +4 -2
- package/dist/components/info-card2.js +4 -2
- package/dist/components/map-select-tools2.js +37 -21
- package/dist/components/public-notification.js +11 -5
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/restHelpersGet.js +23 -19
- package/dist/components/solution-resource.js +1 -1
- package/dist/components/solution-store.js +63 -56
- package/dist/esm/basemap-gallery_7.entry.js +2 -2
- package/dist/esm/buffer-tools_3.entry.js +2 -2
- package/dist/esm/calcite-action-pad_2.entry.js +2 -2
- package/dist/esm/calcite-alert_4.entry.js +12 -10
- package/dist/esm/calcite-block_5.entry.js +4 -4
- package/dist/esm/calcite-dropdown-group_2.entry.js +2 -2
- package/dist/esm/calcite-flow_6.entry.js +2 -2
- package/dist/esm/calcite-shell-panel_14.entry.js +5 -5
- package/dist/esm/card-manager_3.entry.js +7 -6
- package/dist/esm/{common-3b99e350.js → common-1618d62f.js} +1 -1
- package/dist/esm/consent-manager.entry.js +2 -2
- package/dist/esm/crowdsource-manager.entry.js +5 -6
- package/dist/esm/crowdsource-reporter.entry.js +2 -2
- package/dist/esm/{downloadUtils-abb8cda2.js → downloadUtils-16c51b10.js} +5 -5
- package/dist/esm/feature-list.entry.js +6 -6
- package/dist/esm/{helpers-62213648.js → helpers-2298687e.js} +1 -1
- package/dist/esm/{index.es-9283e62c.js → index.es-d950915a.js} +5 -5
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +5 -5
- package/dist/esm/instant-apps-control-panel.entry.js +2 -2
- package/dist/esm/instant-apps-create.entry.js +4 -4
- package/dist/esm/instant-apps-export-views.entry.js +4 -4
- package/dist/esm/instant-apps-export.entry.js +4 -4
- package/dist/esm/instant-apps-header.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend.entry.js +5 -5
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +4 -4
- package/dist/esm/instant-apps-language-switcher.entry.js +6 -6
- package/dist/esm/instant-apps-language-translator.entry.js +6 -6
- package/dist/esm/instant-apps-measurement.entry.js +4 -4
- package/dist/esm/instant-apps-popover.entry.js +4 -4
- package/dist/esm/instant-apps-scoreboard.entry.js +4 -4
- package/dist/esm/instant-apps-sign-in.entry.js +4 -4
- package/dist/esm/instant-apps-splash.entry.js +4 -4
- package/dist/esm/instant-apps-time-filter.entry.js +4 -4
- package/dist/esm/{languageSwitcher-b665499d.js → languageSwitcher-9db90f1e.js} +1 -1
- package/dist/esm/{languageUtil-a3e6adf6.js → languageUtil-2b6e191a.js} +1 -1
- package/dist/esm/layout-manager.entry.js +2 -2
- package/dist/esm/{loadModules-9c062d08.js → loadModules-03ba7abe.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-e758c2ee.js → locale-7162b55a.js} +1 -1
- package/dist/esm/{locale-35ebf4af.js → locale-adb5ff0b.js} +2 -2
- package/dist/esm/map-select-tools_3.entry.js +40 -27
- package/dist/esm/{popupUtils-9b2b0aba.js → popupUtils-44f11275.js} +2 -2
- package/dist/esm/public-notification.entry.js +13 -10
- package/dist/esm/{restHelpersGet-788d7f7b.js → restHelpersGet-0a15c2f4.js} +24 -20
- package/dist/esm/solution-configuration.entry.js +6 -6
- package/dist/esm/solution-contents_3.entry.js +6 -6
- package/dist/esm/{solution-resource-966f8511.js → solution-resource-ab63a236.js} +1 -1
- package/dist/esm/{solution-store-0586e891.js → solution-store-e2690620.js} +65 -58
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +4 -4
- package/dist/esm/store-manager.entry.js +4 -4
- package/dist/esm/{templates-9330d7b8.js → templates-9556eb87.js} +2 -2
- package/dist/esm/{utils-72a48b01.js → utils-178e7afe.js} +1 -1
- package/dist/solutions-components/{p-71452a4e.entry.js → p-002c97df.entry.js} +1 -1
- package/dist/solutions-components/{p-08b0e478.js → p-00b26aac.js} +2 -2
- package/dist/solutions-components/{p-f2ac5d0e.js → p-1904654e.js} +1 -1
- package/dist/solutions-components/{p-e9aba912.entry.js → p-1b9aa18e.entry.js} +1 -1
- package/dist/solutions-components/p-235bf02e.entry.js +6 -0
- package/dist/solutions-components/{p-beeccd19.entry.js → p-24b3aedc.entry.js} +1 -1
- package/dist/solutions-components/{p-f067a46c.js → p-2fa78dd8.js} +1 -1
- package/dist/solutions-components/{p-c742acd9.js → p-2fc63144.js} +1 -1
- package/dist/solutions-components/{p-65283b75.entry.js → p-3438cbc4.entry.js} +1 -1
- package/dist/solutions-components/{p-1176ec70.entry.js → p-38cfa3cd.entry.js} +1 -1
- package/dist/solutions-components/p-3b426576.entry.js +6 -0
- package/dist/solutions-components/{p-de30afd0.entry.js → p-425a1dab.entry.js} +1 -1
- package/dist/solutions-components/{p-29962ae5.entry.js → p-4848b48f.entry.js} +1 -1
- package/dist/solutions-components/p-49aa2929.entry.js +6 -0
- package/dist/solutions-components/{p-73ef6866.js → p-4b3cc01f.js} +3 -3
- package/dist/solutions-components/{p-65581d83.js → p-4cd4cb85.js} +1 -1
- package/dist/solutions-components/{p-2d03b0d7.entry.js → p-5b818d29.entry.js} +1 -1
- package/dist/solutions-components/{p-787a4789.entry.js → p-5c999087.entry.js} +1 -1
- package/dist/solutions-components/{p-32f5c6ec.entry.js → p-69cfa9e6.entry.js} +1 -1
- package/dist/solutions-components/{p-51cfb4a6.entry.js → p-6b30ca36.entry.js} +1 -1
- package/dist/solutions-components/{p-4b843bc0.entry.js → p-6de944af.entry.js} +1 -1
- package/dist/solutions-components/{p-4a0838c0.entry.js → p-78712b70.entry.js} +1 -1
- package/dist/solutions-components/{p-ee87a7b0.entry.js → p-7af4c00e.entry.js} +3 -3
- package/dist/solutions-components/{p-09d62c22.js → p-7bfecd07.js} +1 -1
- package/dist/solutions-components/{p-07053ee3.entry.js → p-80e6c7cb.entry.js} +1 -1
- package/dist/solutions-components/{p-ef493a84.entry.js → p-86e6b5b3.entry.js} +1 -1
- package/dist/solutions-components/{p-81f62cf5.entry.js → p-88d4db61.entry.js} +1 -1
- package/dist/solutions-components/{p-13f83a1a.entry.js → p-8a6fa619.entry.js} +1 -1
- package/dist/solutions-components/{p-e05894a6.entry.js → p-8b999a2b.entry.js} +1 -1
- package/dist/solutions-components/{p-614edd9f.entry.js → p-8e8b92b4.entry.js} +1 -1
- package/dist/solutions-components/{p-a759e0e5.js → p-90d6755b.js} +1 -1
- package/dist/solutions-components/{p-f4828ba4.entry.js → p-932f22b5.entry.js} +1 -1
- package/dist/solutions-components/{p-afad4f05.js → p-a091bc9a.js} +1 -1
- package/dist/solutions-components/{p-a7b05a79.entry.js → p-a22b8cc1.entry.js} +1 -1
- package/dist/solutions-components/{p-a7710355.js → p-a860f365.js} +8 -7
- package/dist/solutions-components/{p-2cff27c5.js → p-a8e6463b.js} +2 -2
- package/dist/solutions-components/{p-7efb5ef0.entry.js → p-a9818be2.entry.js} +1 -1
- package/dist/solutions-components/{p-3e84a420.entry.js → p-ab2adcaf.entry.js} +1 -1
- package/dist/solutions-components/{p-4c0b8e55.entry.js → p-abc9e858.entry.js} +1 -1
- package/dist/solutions-components/{p-af2c8aa9.js → p-ac122d9e.js} +1 -1
- package/dist/solutions-components/{p-ed9b7fa1.entry.js → p-b19ca04e.entry.js} +1 -1
- package/dist/solutions-components/{p-fb0fdc0d.entry.js → p-b7cec3bd.entry.js} +1 -1
- package/dist/solutions-components/p-b80bcd0b.entry.js +6 -0
- package/dist/solutions-components/{p-92744164.entry.js → p-b850796d.entry.js} +1 -1
- package/dist/solutions-components/{p-7c583516.js → p-badcaf04.js} +1 -1
- package/dist/solutions-components/{p-a2150807.entry.js → p-c6473b38.entry.js} +1 -1
- package/dist/solutions-components/{p-f341b87e.entry.js → p-d57736d0.entry.js} +1 -1
- package/dist/solutions-components/{p-09b47605.js → p-d7868dd4.js} +1 -1
- package/dist/solutions-components/{p-f7d822f7.entry.js → p-d8047d8f.entry.js} +1 -1
- package/dist/solutions-components/{p-386429a4.entry.js → p-dc17b638.entry.js} +1 -1
- package/dist/solutions-components/{p-02d3d3e9.entry.js → p-e3e593db.entry.js} +2 -2
- package/dist/solutions-components/{p-00786a30.entry.js → p-edd70ba3.entry.js} +1 -1
- package/dist/solutions-components/{p-6f836c0a.entry.js → p-ef6567ae.entry.js} +1 -1
- package/dist/solutions-components/{p-0bf41dfd.entry.js → p-f59b4183.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +3 -0
- package/dist/solutions-components/utils/pdfUtils.ts +1 -1
- package/dist/types/components/card-manager/card-manager.d.ts +4 -0
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +0 -4
- package/dist/types/components/edit-card/edit-card.d.ts +4 -0
- package/dist/types/components/info-card/info-card.d.ts +4 -0
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +12 -0
- package/dist/types/components/public-notification/public-notification.d.ts +12 -0
- package/dist/types/components.d.ts +72 -8
- package/dist/types/utils/interfaces.d.ts +3 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-2977bdbf.entry.js +0 -6
- package/dist/solutions-components/p-d0432926.entry.js +0 -6
- package/dist/solutions-components/p-d1fd4a53.entry.js +0 -6
- package/dist/solutions-components/p-f26423c7.entry.js +0 -6
- package/dist/solutions-components_commit.txt +0 -8
- /package/dist/cjs/{esri-loader-a56cbcbe.js → esri-loader-08dc41bd.js} +0 -0
- /package/dist/esm/{esri-loader-781d738a.js → esri-loader-c6842c6b.js} +0 -0
- /package/dist/solutions-components/{p-6a68306c.js → p-0a24ad5f.js} +0 -0
- /package/dist/solutions-components/{p-659678f1.js → p-9fe07c30.js} +0 -0
@@ -4,11 +4,11 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-e3f04fa1.js';
|
7
|
-
import { g as getLocaleComponentStrings } from './locale-
|
8
|
-
import { n as nodeListToArray } from './common-
|
9
|
-
import './esri-loader-
|
7
|
+
import { g as getLocaleComponentStrings } from './locale-7162b55a.js';
|
8
|
+
import { n as nodeListToArray } from './common-1618d62f.js';
|
9
|
+
import './esri-loader-c6842c6b.js';
|
10
10
|
import './_commonjsHelpers-089957fe.js';
|
11
|
-
import './solution-resource-
|
11
|
+
import './solution-resource-ab63a236.js';
|
12
12
|
import './interfaces-659e3836.js';
|
13
13
|
|
14
14
|
/** @license
|
@@ -4,13 +4,13 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, g as getElement } from './index-e3f04fa1.js';
|
7
|
-
import { s as state } from './solution-store-
|
8
|
-
import { c as getFeatureServices, d as getSpatialReferenceInfo } from './templates-
|
7
|
+
import { s as state } from './solution-store-e2690620.js';
|
8
|
+
import { c as getFeatureServices, d as getSpatialReferenceInfo } from './templates-9556eb87.js';
|
9
9
|
import './index-1dc14abf.js';
|
10
10
|
import './interfaces-659e3836.js';
|
11
|
-
import './solution-resource-
|
11
|
+
import './solution-resource-ab63a236.js';
|
12
12
|
import './_commonjsHelpers-089957fe.js';
|
13
|
-
import './restHelpersGet-
|
13
|
+
import './restHelpersGet-0a15c2f4.js';
|
14
14
|
|
15
15
|
const StoreManager = class {
|
16
16
|
constructor(hostRef) {
|
@@ -4,8 +4,8 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { C as CSpatialRefCustomizingPrefix } from './interfaces-659e3836.js';
|
7
|
-
import './solution-resource-
|
8
|
-
import { a as getProp, b as getPropWithDefault } from './restHelpersGet-
|
7
|
+
import './solution-resource-ab63a236.js';
|
8
|
+
import { a as getProp, b as getPropWithDefault } from './restHelpersGet-0a15c2f4.js';
|
9
9
|
|
10
10
|
/** @license
|
11
11
|
* Copyright 2022 Esri
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { b as getLocaleComponentStrings } from './locale-
|
6
|
+
import { b as getLocaleComponentStrings } from './locale-adb5ff0b.js';
|
7
7
|
import { c as createStore } from './index-1dc14abf.js';
|
8
8
|
|
9
9
|
var EInputType;
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as e,c as t,g as i,h as a,H as s}from"./p-f4c4a2b7.js";import{s as c}from"./p-
|
6
|
+
import{r as e,c as t,g as i,h as a,H as s}from"./p-f4c4a2b7.js";import{s as c}from"./p-a860f365.js";import{g as l}from"./p-d7868dd4.js";import{n}from"./p-2fa78dd8.js";import{C as r,g as o}from"./p-80cb7c73.js";import"./p-dcc35070.js";import"./p-9fe07c30.js";import"./p-d4056c1c.js";import"./p-badcaf04.js";import"./p-0a24ad5f.js";const h=class{constructor(i){e(this,i),this.solutionItemSelected=t(this,"solutionItemSelected",7),this.selectedItemId=void 0,this.templateHierarchy=[]}get el(){return i(this)}valueWatchHandler(e,t){e&&e!==t&&Array.isArray(e)&&e.length>0&&this._treeItemSelected(e[0].id)}componentWillLoad(){this.valueWatchHandler(this.templateHierarchy,[])}render(){return a(s,{key:"7546d1fe9d944520db9f8f81600fb7cf0655f1ab"},a("calcite-tree",{key:"94bea7616cd3bdbb9fbcaddd49bb394e11bcf88b"},this.renderHierarchy(this.templateHierarchy)))}renderHierarchy(e){return e.map((e=>{const t=this.selectedItemId&&this.selectedItemId===e.id;return e.dependencies&&e.dependencies.length>0?a("calcite-tree-item",{onClick:t=>this._treeItemSelected(e.id,t),selected:t},a("solution-item-icon",{type:e.type,typeKeywords:e.typeKeywords}),a("span",{class:"icon-text",title:e.title},e.title),a("calcite-tree",{slot:"children"},this.renderHierarchy(e.dependencies))):a("calcite-tree-item",{onClick:t=>this._treeItemSelected(e.id,t),selected:t},a("solution-item-icon",{type:e.type,typeKeywords:e.typeKeywords}),a("span",{class:"icon-text",title:e.title},e.title))}))}solutionItemSelected;_treeItemSelected(e,t){const i=t?.target?.closest("calcite-tree-item");i&&(i.expanded=!i?.expanded),this.selectedItemId=e,this.solutionItemSelected.emit(e)}static get assetsDirs(){return["item-type-icons"]}static get watchers(){return{templateHierarchy:["valueWatchHandler"]}}};h.style=".icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";const d=class{constructor(t){e(this,t),this.authentication=void 0,this.itemId="",this.solutionVariables="",this.organizationVariables="",this.itemType=void 0,this._translations=void 0}get el(){return i(this)}itemIdWatchHandler(){const e=c.getItemInfo(this.itemId);this.itemType=e.type}async componentWillLoad(){return this._getTranslations()}render(){return a(s,{key:"16de446a44799754d7066eb5cc587585fc9e37c8"},a("div",{key:"ddb7c1e6c86657502dc4b293d495f3b4dee594cf",class:"configuration-container"},a("div",{key:"016954a98a5eb229a1f9eb2a4b9260daff3593bf",class:"configuration"},this._showGroupTabs("Group"===this.itemType),this._showItemTabs("Group"!==this.itemType))))}_showGroupTabs(e){return a("calcite-tabs",{class:"config-tabs",style:{display:e?"inherit":"none"}},a("calcite-tab-nav",{slot:"tab-nav"},a("calcite-tab-title",null,this._translations.groupDetailsTab),a("calcite-tab-title",null,this._translations.sharingTab)),a("calcite-tab",{class:"config-tab",id:"group-tab",selected:!0},a("solution-item-details",{"item-id":this.itemId})),a("calcite-tab",{class:"config-tab",id:"share-tab"},a("solution-item-sharing",{"group-id":this.itemId})))}_showItemTabs(e){return a("calcite-tabs",{class:"config-tabs",style:{display:e?"inherit":"none"}},a("calcite-tab-nav",{slot:"tab-nav"},a("calcite-tab-title",null,this._translations.itemDetailsTab),a("calcite-tab-title",null,this._translations.dataTab),a("calcite-tab-title",null,this._translations.propertiesTab),a("calcite-tab-title",null,this._translations.resourcesTab)),a("calcite-tab",{class:"config-tab",selected:!0},a("solution-item-details",{"item-id":this.itemId})),a("calcite-tab",{class:"config-tab",id:"data-tab"},a("solution-template-data",{instanceid:"data","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),a("calcite-tab",{class:"config-tab",id:"props-tab"},a("solution-template-data",{instanceid:"properties","item-id":this.itemId,"organization-variables":this.organizationVariables,"solution-variables":this.solutionVariables})),a("calcite-tab",{class:"config-tab",id:"resources-tab"},a("solution-resource-item",{authentication:this.authentication,class:"solutions-resource-container","item-id":this.itemId})))}async _getTranslations(){const e=await l(this.el);this._translations=e[0]}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};d.style=".configuration-container{position:relative;height:100%;width:100%}.configuration{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:flex;padding:0.5rem;border:1px #808080 solid}.config-tabs{width:100%}.config-tab{width:100%;overflow-y:auto;height:inherit}";const f="3857",b=class{constructor(i){e(this,i),this.featureServiceSpatialReferenceChange=t(this,"featureServiceSpatialReferenceChange",7),this.enableDefaultSpatialReferenceChange=t(this,"enableDefaultSpatialReferenceChange",7),this.enabledSpatialReferenceChange=t(this,"enabledSpatialReferenceChange",7),this.enabled=!1,this.enableDefault=!1,this.featureServices=[],this._translations=void 0}get el(){return i(this)}enabledChanged(){this._handleSpatialRefParamChange()}enableDefaultChanged(){this._handleDefaultSpatialRefParamChange()}componentWillLoad(){return this._updateUIFromStore(),this._getTranslations()}render(){return this._updateUIFromStore(),a(s,{key:"e9c18af4e96b99fc53fa9e93512209ad038e0462"},a("label",{key:"35993e89a9fcf0d291be007b4107d6b3513a0da8",class:"switch-label"},a("calcite-switch",{key:"cd036d24e5b801fb50997920ccdb74e4814223d9",checked:this.enabled,class:"spatial-ref-switch",onCalciteSwitchChange:e=>this.enabled=e.target.checked,scale:"m"}),this._translations.enableSpatialReference),a("br",{key:"c41f1a994a99a8ac76cb885c32206148b6caa43e"}),a("div",{key:"5449bdba86513ce483d73cfa9c5907c597ae198a",class:"spatial-ref-component",id:"spatialRefDefn"},this._renderFeatureServicesList(this.featureServices)),a("label",{key:"df6dff1f168596f3b5e29ea44efbb69209442fb5",class:"switch-label spatial-ref-component"},a("calcite-switch",{key:"6caf709ea8db649c999b5b5ef388b36b3e1962e6",checked:this.enableDefault,class:"spatial-ref-switch",disabled:!this.enabled,onCalciteSwitchChange:e=>this.enableDefault=e.target.checked,scale:"m"}),this._translations.enableDefaultSpatialReference))}featureServiceSpatialReferenceChange;enableDefaultSpatialReferenceChange;enabledSpatialReferenceChange;solutionStoreHasChanges(){this.featureServices=c.getStoreInfo("featureServices")}async _testAccess(e,t,i,a){switch(e){case"_parameterizeWkid":return Promise.resolve(this._parameterizeWkid(t));case"_unparameterizeWkid":return Promise.resolve(this._unparameterizeWkid(t))}return Promise.resolve(null)}_clearFeatureServiceDefaults(e){n(this.el.getElementsByClassName("spatial-ref-item-switch")).forEach((e=>e.checked=!1)),e.forEach((e=>this._updateEnabledServices({detail:{switched:!1}},e)))}_handleDefaultSpatialRefParamChange(){this._updateStore(),this.enableDefaultSpatialReferenceChange.emit({defaultWkid:this.enableDefault?f:""})}_handleSpatialRefParamChange(){this.enabled||(this.enableDefault=!1,this._clearFeatureServiceDefaults(this.featureServices)),this._updateStore(),this.enabledSpatialReferenceChange.emit({enabled:this.enabled})}_parameterizeWkid(e){return e?e.toString().startsWith(r)?e:`${r}${e}${o}`:e}_renderFeatureServicesList(e){const t=c.getStoreInfo("spatialReferenceInfo"),i=e.filter((e=>Object.keys(t.services).some((t=>t===e.id))));return i.length>0?a("div",null,a("label",{class:"spatial-ref-item-title"},this._translations.featureServicesHeading),a("ul",{class:"spatial-ref-services-list"},i.map((e=>a("li",{class:"spatial-ref-services-list-item"},a("label",{class:"switch-label"},a("calcite-switch",{checked:t.services[e.id],class:"spatial-ref-item-switch",disabled:!this.enabled,onCalciteSwitchChange:t=>this._updateEnabledServices(t,e),scale:"m"}),e.name)))))):null}_updateEnabledServices(e,t){const i=c.getStoreInfo("spatialReferenceInfo");i.services[t.id]=void 0!==e.detail?.switched?e.detail.switched:void 0===e.target?.checked||e.target.checked,c.setStoreInfo("spatialReferenceInfo",i),this._updateStore(),this.featureServiceSpatialReferenceChange.emit(t)}_unparameterizeWkid(e){return e&&e.toString().startsWith(r)?e.substring(r.length,e.length-o.length):e}_updateFeatureServices(e){e.enabled||Object.keys(e.services).forEach((t=>{e.services[t]=!1})),this.featureServices.forEach((t=>{t.enabled=e.services[t.id],t.wkid=t.enabled?this._parameterizeWkid(t.wkid):this._unparameterizeWkid(t.wkid)})),c.setStoreInfo("featureServices",this.featureServices)}_updateStore(){const e=c.getStoreInfo("spatialReferenceInfo");e.enabled=this.enabled,this.enabled&&this.enableDefault?e.default=f:e.hasOwnProperty("default")&&delete e.default,c.setStoreInfo("spatialReferenceInfo",e),this._updateFeatureServices(e)}_updateUIFromStore(){const e=c.getStoreInfo("spatialReferenceInfo");this.enabled=e.enabled,this.enableDefault=!!e.default,this.featureServices=c.getStoreInfo("featureServices")}async _getTranslations(){const e=await l(this.el);this._translations=e[0]}static get watchers(){return{enabled:["enabledChanged"],enableDefault:["enableDefaultChanged"]}}};b.style=".spatial-ref-switch{margin-inline-end:0.5rem}.spatial-ref-component{margin-top:0.625rem;margin-inline-start:2.5rem}#spatialRefDefn .sc-calcite-label-h label.sc-calcite-label{margin:0px;background-color:#CBC3E3}.spatial-ref-item-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.spatial-ref-item-switch{margin-inline-end:0.5rem}.switch-label{font-size:0.875rem;line-height:1.25rem}.spatial-ref-services-list{margin-block-start:0.5em;margin-block-end:0.5em;list-style-type:none;padding-inline-start:2em}.spatial-ref-services-list-item{margin-top:0.25rem}";export{h as solution_contents,d as solution_item,b as solution_spatial_ref}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{_ as t}from"./p-
|
6
|
+
import{_ as t}from"./p-4b3cc01f.js";import{l as s}from"./p-d7868dd4.js";
|
7
7
|
/** @license
|
8
8
|
* Copyright 2022 Esri
|
9
9
|
*
|
@@ -18,4 +18,4 @@ import{_ as t}from"./p-73ef6866.js";import{l as s}from"./p-09b47605.js";
|
|
18
18
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
19
|
* See the License for the specific language governing permissions and
|
20
20
|
* limitations under the License.
|
21
|
-
*/class
|
21
|
+
*/class i{arcade;intl;async getPopupTitle(s,i){this.arcade||await this._initModules();let e={};for(const[t,i]of Object.entries(s.attributes))e={...e,[`{${t.toUpperCase()}}`]:i};const a=s.layer,o=this._removeTags(a?.popupTemplate?.title);if(o.includes("{expression/expr")&&null!=a?.popupTemplate?.expressionInfos)for(let t=0;t<a.popupTemplate?.expressionInfos.length;t++){const o=a.popupTemplate.expressionInfos[t],n=this.arcade.createArcadeProfile("popup");try{const t=await this.arcade.createArcadeExecutor(o.expression,n),r=await t.executeAsync({$feature:s,$layer:a,$map:i});null==r&&""===r||(e[`{expression/${o.name}}`.toUpperCase()]=r)}catch(t){console.error(t);continue}}return a.popupTemplate.fieldInfos&&a.fields.forEach((i=>{const o=s.attributes[i.name],n=a.popupTemplate.fieldInfos.find((t=>t.fieldName.toLowerCase()===i.name.toLowerCase())),r=t(o,i.type,i.domain,n?.format,this.intl);e[`{${i.name.toUpperCase()}}`]=r??o})),o?.replace(/{.*?}/g,(t=>null!=e[t.toUpperCase()]?e[t.toUpperCase()]:""))}_removeTags(t){return null==t||""===t?"":t.toString().replace(/(<([^>]+)>)/gi,"")}async _initModules(){const[t,i]=await s(["esri/arcade","esri/intl"]);this.arcade=t,this.intl=i}}export{i as P}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{l}from"./p-65581d83.js";import{c as n}from"./p-dcc35070.js";async function o(n,o,i){const[u]=await l(["esri/layers/effects/jsonUtils"]),{toJSON:v,fromJSON:d}=u,t=null==o?void 0:o.layer;if(!n)return(null==t?void 0:t.effect)?t.effect:(null==t?void 0:t.featureEffect)?"includedEffect"===i?t.featureEffect.includedEffect:t.featureEffect.excludedEffect:null;const e=v(n);let r;r=t.featureEffect?"includedEffect"===i?t.featureEffect.includedEffect:t.featureEffect.excludedEffect:t.effect;const a=r?v(r):null;if(!a)return d(e);let s=[...a];return e&&e.forEach((l=>{s.forEach((n=>{const{value:o}=n;if(o)o.forEach(((i,u)=>{i.type===l.type?o[u]=l:!n.value.find((l=>l.type===e[0].type))&&(n.value=[...n.value,...e])}));else{const o=!s.find((l=>l.type===n.type));!s.find((n=>n.type===l.type))&&(s=[...s,l]),o&&(s=[...s,n])}}))})),d(s)}const i=n({data:{},relationshipRampExpandStates:{}}),u=i.state,v=i;async function d(l,n,o){var i,u,v,d,t,e,r,a,s;try{const c="group"===(null===(i=null==n?void 0:n.layer)||void 0===i?void 0:i.type),f=null===(v=null===(u=null==n?void 0:n.layer)||void 0===u?void 0:u.layers)||void 0===v?void 0:v.some((l=>l.visible)),$=null===(t=null===(d=null==n?void 0:n.layer)||void 0===d?void 0:d.layers)||void 0===t?void 0:t.every((l=>!(null==l?void 0:l.legendEnabled)));await o.whenOnce((()=>"ready"===(null==l?void 0:l.state))),!c||c&&f?c&&$?await o.whenOnce((()=>{var l;return null===(l=null==n?void 0:n.layer)||void 0===l?void 0:l.loaded})):await o.whenOnce((()=>null==n?void 0:n.ready)):await o.whenOnce((()=>null==n?void 0:n.legendElements));const y=null===(e=null==n?void 0:n.legendElements)||void 0===e?void 0:e[0],m=new Map,p=n.layer,N=await l.view.whenLayerView(p);await o.whenOnce((()=>!1===(null==N?void 0:N.updating)));const O=null===(r=p.renderer)||void 0===r?void 0:r.field;return void 0!==y&&(null===(a=null==y?void 0:y.infos)||void 0===a||a.forEach((l=>{var n;if("symbol-table"===l.type){const n=[];l.infos.forEach((l=>{n.push({count:null,selected:!1,legendElementInfo:l})})),m.set(l.title,{count:null,selected:!1,legendElementInfo:l,nestedInfos:n})}else m.set(null!==(n=l.label)&&void 0!==n?n:p.id,{count:null,selected:!1,legendElementInfo:l})}))),Promise.resolve({activeLayerInfo:n,title:null===(s=null==N?void 0:N.layer)||void 0===s?void 0:s.title,categories:m,field:O,queryExpressions:[],totalCount:null,fLayerView:N,legendElement:y})}catch(l){return Promise.resolve(null)}}async function t(l,n){const o={},i=[];l.activeLayerInfos.forEach(function(l,n,o){return i=>{var u;const v=null===(u=null==i?void 0:i.layer)||void 0===u?void 0:u.type;if("feature"===v||"group"===v){const u=d(n,i,o).then((l=>l));u&&l.push(u);const v=i=>{const u=d(n,i,o).then((l=>l));u&&l.push(u)};i.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{v(l)}))}))}))}}}(i,l,n));try{return(await Promise.all(i)).forEach((l=>{var n,i;return o[null===(i=null===(n=null==l?void 0:l.activeLayerInfo)||void 0===n?void 0:n.layer)||void 0===i?void 0:i.id]=l})),Promise.resolve(o)}catch(l){return Promise.reject(null)}}function e(l){return Array.from(l).map((l=>l[1]))}function r(l,n,o,i,u){var v,d,t;return i?null===(v=null==i?void 0:i.nestedInfos)||void 0===v?void 0:v[u]:null===(d=null==l?void 0:l.categories)||void 0===d?void 0:d.get(null!==(t=null==o?void 0:o.label)&&void 0!==t?t:null==n?void 0:n.id)}function a(l){var n;return null===(n=null==u?void 0:u.data)||void 0===n?void 0:n[null==l?void 0:l.id]}async function s(n,i,u,v,d){var t,e,r,a,s;const[$,m]=await l(["esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]),{queryExpressions:p,fLayerView:N}=n;!function(l,n,o,i){var u,v,d,t;const{field:e,legendElement:r,categories:a,fLayerView:s}=l,$=null==l?void 0:l.queryExpressions;i&&Array.from(l.categories).map((l=>l[1])).forEach((l=>{var n,o;(null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected)))&&(null===(o=l.nestedInfos)||void 0===o||o.forEach((l=>{const n=e?`${e} = '${l.legendElementInfo.value}'`:null,o=n?$.indexOf(n):-1;n&&-1!==o&&$.splice(o,1)})))}));const m=null==r?void 0:r.infos,p=y(s);let N=p?c(n,s):f(n,e,o,r,m,"");const O=a?i?null===(v=null===(u=a.get(i.title))||void 0===u?void 0:u.nestedInfos)||void 0===v?void 0:v[o]:a.get(null!==(d=n.label)&&void 0!==d?d:null===(t=null==s?void 0:s.layer)||void 0===t?void 0:t.id):null;O&&(O.selected=!(null==O?void 0:O.selected));const A=m&&1===m.length,w=$.indexOf(N);if(p){const l=$.indexOf(N);0===$.length||-1===l?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]?$[0]="1=0":$&&1===$.length||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]?$[0]=null:$.splice(l,1),$.join(" OR ")}else 0===$.length||-1===w?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]&&!A?$[0]="1=0":$&&1===$.length&&!A||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]&&!A?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]&&!A?$[0]=null:$.splice(w,1);if(i){const n=[];Array.from(l.categories).map((l=>l[1])).forEach((l=>{var o,i;(null===(o=l.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=l.nestedInfos)||void 0===i||i.forEach((l=>{e&&`${e} = '${l.legendElementInfo.value}'`&&n.push(`${e} = '${l.legendElementInfo.value}'`)})))})),n.forEach((l=>{-1===$.indexOf(l)&&$.push(l)}))}}(n,i,u,d);const O=p.every((l=>l&&l.includes("<>")))?" AND ":" OR ",A=p.join(O),w=null!==(s=null!==(e=null===(t=null==N?void 0:N.filter)||void 0===t?void 0:t.timeExtent)&&void 0!==e?e:null===(a=null===(r=null==N?void 0:N.featureEffect)||void 0===r?void 0:r.filter)||void 0===a?void 0:a.timeExtent)&&void 0!==s?s:null,{type:E}=v;if("filter"===E)N.filter=new $({where:A,timeExtent:w});else if(v.effect){const{includedEffect:l,excludedEffect:n}=v.effect,i=await o(n,N,"excludedEffect"),u=await o(l,N,"includedEffect");N.featureEffect=new m({filter:new $({where:A,timeExtent:w}),includedEffect:u,excludedEffect:i})}return Promise.resolve()}function c(l,n){const o=n?n.layer.renderer.authoringInfo:null,i=o?o.fields:null,u=[];if(!i)return"";if(l.hasOwnProperty("value"))return i.forEach((n=>{l.value!==n&&u.push(`(${l.value} > ${n} OR (${n} IS NULL AND ${l.value} <> 0 AND ${l.value} IS NOT NULL))`)})),u.join(" AND ");{const l=[];i.forEach((n=>{l.push(`${n} = 0`)}));const n=[];if(i.length>2){i.forEach((l=>{i.forEach((o=>{if(l===o)return;const u=[];i.forEach((n=>{l!==n&&o!==n&&u.push(`${l} = ${o} AND (${l} > ${n} OR ${l} >= ${n})`)})),n.push(`(${u.join(" AND ")})`)}))}));const o=[];return i.forEach((l=>{o.push(`${l} IS NULL`)})),`(${l.join(" AND ")}) OR (${n.join(" OR ")}) OR (${o.join(" AND ")})`}{const n=[];i.forEach((o=>{i.forEach((i=>{o!==i&&(n.push(`${o} = ${i}`),n.push(`(${l.join(" AND ")})`))}))}));const o=[];return i.forEach((l=>{i.forEach((n=>{l!==n&&o.push(`(${l} = 0 AND ${n} IS NULL) OR (${l} IS NULL AND ${n} IS NULL)`)}))})),`(${n.join(" OR ")}) OR (${o.join(" OR ")})`}}}function f(l,n,o,i,u,v){const{value:d}=l;if("symbol-table"===(null==i?void 0:i.type)){if(!l.hasOwnProperty("value")||Array.isArray(l.value)&&1===(null==u?void 0:u.length)){if((null==u?void 0:u[0].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[0].value)&&(null==u?void 0:u[(null==u?void 0:u.length)-2])&&(null==u?void 0:u[(null==u?void 0:u.length)-2].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[(null==u?void 0:u.length)-2].value))return v?`((${n}/${v}) > ${null==u?void 0:u[0].value[1]}) OR ((${n}/${v}) < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]}) OR ${v} = 0 OR ${v} IS NULL`:`${n} > ${null==u?void 0:u[0].value[1]} OR ${n} < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]} OR ${n} IS NULL`;if(1===(null==u?void 0:u.length))return"1=0";{const l=[];null==u||u.forEach((o=>{if(null==o?void 0:o.value){const{value:i}=o,u=-1!==i.indexOf("'")?i.split("'").join("''"):null,v=u?`${n} <> '${u}'`:isNaN(i)||"string"==typeof i&&!i.trim()?`${n} <> '${i}'`:`${n} <> ${i} AND ${n} <> '${i}'`;l.push(v)}}));const o=l.join(" AND ");return n&&o?`${o} OR ${n} IS NULL`:""}}{const i=-1!==d.indexOf("'")?d.split("'").join("''"):null,t=Array.isArray(l.value),e=(null==u?void 0:u.length)-1===o,r=!(null==u?void 0:u[(null==u?void 0:u.length)-1].hasOwnProperty("value")),a=o===(null==u?void 0:u.length)-2;return t?v?e||r&&a?`(${n}/${v}) >= ${d[0]} AND (${n}/${v}) <= ${l.value[1]}`:`(${n}/${v}) > ${d[0]} AND (${n}/${v}) <= ${l.value[1]}`:e||r&&a?`${n} >= ${d[0]} AND ${n} <= ${d[1]}`:`${n} > ${d[0]} AND ${n} <= ${d[1]}`:1===(null==u?void 0:u.length)&&n?isNaN(d)||!d.trim().length?`${n} <> '${d}'`:`${n} <> ${d} OR ${n} <> '${d}'`:i?`${n} = '${i}'`:isNaN(d)||!d.trim().length?`${n} = '${d}'`:`${n} = ${d} OR ${n} = '${d}'`}}return""}function $(l){return Array.isArray(l)?l.every((l=>!l.selected)):l&&Array.from(l.categories.entries()).every((l=>!l[1].selected))&&"1=0"!==l.queryExpressions[0]}function y(l){var n,o,i;return"predominance"===(null===(i=null===(o=null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.renderer)||void 0===o?void 0:o.authoringInfo)||void 0===i?void 0:i.type)}function m(l){var n;return"relationship-ramp"===(null===(n=null==l?void 0:l.legendElements[1])||void 0===n?void 0:n.type)}function p(l,n,o){var i,u,v,d,t,e,r,a,s,c,f,$,m,p,N,O,A,w,E;const b=l.layer,R=null===(i=null==b?void 0:b.renderer)||void 0===i?void 0:i.field,L=null==n?void 0:n.type,D=null==l?void 0:l.layerView,I=null===(v=null===(u=null==D?void 0:D.layer)||void 0===u?void 0:u.renderer)||void 0===v?void 0:v.classBreakInfos,x=(null===(t=null===(d=null==D?void 0:D.layer)||void 0===d?void 0:d.renderer)||void 0===t?void 0:t.uniqueValueInfos)&&R,g="size-ramp"===L,h="color-ramp"===L,P="opacity-ramp"===L,S="heatmap-ramp"===L,U=D&&I&&I.length>1,z=null===(a=null===(r=null===(e=null==D?void 0:D.layer)||void 0===e?void 0:e.renderer)||void 0===r?void 0:r.authoringInfo)||void 0===a?void 0:a.type,F="class-breaks-color"===z,k="class-breaks-size"===z,q=1===(null===(s=null==n?void 0:n.infos)||void 0===s?void 0:s.length)&&!R,V="relationship"===z&&"size-ramp"!==(null==n?void 0:n.type)&&"symbol-table"!==(null==n?void 0:n.type),C="feature"===(null===(c=null==l?void 0:l.layer)||void 0===c?void 0:c.type),J=C&&R&&!h&&!g&&U,T=!(!C||!R||h||g||U),M=!!(T||y(D)&&!g||F&&R||k&&R||q&&!R&&null!==R||V||x),B=(null===(f=null==l?void 0:l.layer)||void 0===f?void 0:f.featureReduction)&&"size-ramp"===(null===(m=null===($=null==l?void 0:l.legendElements)||void 0===$?void 0:$[o])||void 0===m?void 0:m.type),G="symbol-table"===(null==n?void 0:n.type)&&1===(null===(p=null==n?void 0:n.infos)||void 0===p?void 0:p.length),H=!(null==l?void 0:l.legendElements.every((l=>"color-ramp"!==l.type))),K=!(null==l?void 0:l.legendElements.every((l=>"size-ramp"!==l.type))),Q=G&&H,W=G&&K,X=null===(N=null==n?void 0:n.infos)||void 0===N?void 0:N.every((l=>"number"==typeof l.value)),Y="symbol-table"===(null===(A=null===(O=null==l?void 0:l.legendElements)||void 0===O?void 0:O[0])||void 0===A?void 0:A.type)&&"color-ramp"===(null===(E=null===(w=null==l?void 0:l.legendElements)||void 0===w?void 0:w[1])||void 0===E?void 0:E.type),Z="dot-density"===z,_=j(null==l?void 0:l.layer,R);return!(!C||B||P||S||Q||W||X||Y||Z||!_)&&(I?J||M:T||M)}function N(l){var n,o,i,u,v;return l.queryExpressions=[],(null===(o=null===(n=null==l?void 0:l.fLayerView)||void 0===n?void 0:n.filter)||void 0===o?void 0:o.where)&&(l.fLayerView.filter.where=""),(null===(v=null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.featureEffect)||void 0===u?void 0:u.filter)||void 0===v?void 0:v.where)&&(l.fLayerView.featureEffect=null),l.categories.forEach((l=>{l.selected=!1})),l}function O(l,n){var o,i,u,v,d,t,e,r,a,s,c;const f=l.categories.get(n);null===(o=null==f?void 0:f.nestedInfos)||void 0===o||o.forEach((n=>{const o=l.queryExpressions.indexOf(`${l.field} = '${n.legendElementInfo.value}'`);-1!==o&&l.queryExpressions.splice(o,1),n.selected=!1}));const $=[],y=Array.from(l.categories).map((l=>l[1]));y.forEach((n=>{var o,i;(null===(o=n.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=n.nestedInfos)||void 0===i||i.forEach((n=>{$.push(`${l.field} = '${n.legendElementInfo.value}'`)})))})),$.forEach((n=>{-1===l.queryExpressions.indexOf(n)&&l.queryExpressions.push(n)}));let m=l.queryExpressions.join(" OR ");const p=y.every((l=>{var n;return null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected))}));return p?((null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.filter)||void 0===u?void 0:u.where)&&(l.fLayerView.filter.where=""),(null===(t=null===(d=null===(v=null==l?void 0:l.fLayerView)||void 0===v?void 0:v.featureEffect)||void 0===d?void 0:d.filter)||void 0===t?void 0:t.where)&&(l.fLayerView.featureEffect=null),l.queryExpressions=[]):((null===(r=null===(e=null==l?void 0:l.fLayerView)||void 0===e?void 0:e.filter)||void 0===r?void 0:r.where)&&(l.fLayerView.filter.where=m),(null===(c=null===(s=null===(a=null==l?void 0:l.fLayerView)||void 0===a?void 0:a.featureEffect)||void 0===s?void 0:s.filter)||void 0===c?void 0:c.where)&&(l.fLayerView.featureEffect.filter.where=m)),l}async function A(l,n,o){var i,u;const v=l.fLayerView.createQuery();if(o)if(o.nestedInfos.every((l=>!l.selected))){const n=o.nestedInfos.map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");v.where=n}else{const n=o.nestedInfos.filter((l=>l.selected)).map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");v.where=n}else{const n=l.queryExpressions.join(" OR ");v.where=n}try{const{extent:o}=await(null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.layer)||void 0===u?void 0:u.queryExtent(v));await n.goTo(o)}catch(l){}}function w(l){return l.map((l=>null==l?void 0:l.count)).reduce(((l,n)=>l+n))}function E(l){return l.map((l=>{var n;return null===(n=null==l?void 0:l.nestedInfos)||void 0===n?void 0:n.map((l=>l.count)).reduce(((l,n)=>l+n))})).reduce(((l,n)=>l+n))}async function b(l,n,o,i,u,v,d,t){var e,r,a;if(!n)return;if(!j(null==n?void 0:n.layer,o))return;const s="feature"===(null===(e=null==n?void 0:n.layer)||void 0===e?void 0:e.type)?n.createQuery():null,$=y(n)?c(i,n):i.type?f(d,o,t,i,i.infos):f(i,o,u,v,v.infos);s&&$&&(s.where="1=0"===$?"1=1":$,s.geometry=l);try{const l=s?await n.queryFeatureCount(s):null;return Promise.resolve({[null!==(r=i.label)&&void 0!==r?r:null===(a=null==n?void 0:n.layer)||void 0===a?void 0:a.id]:l})}catch(l){console.error("FAILURE AT 'getInfoCount': ",l)}return Promise.resolve(null)}async function R(l,n){let o=Object.assign({},n);const{activeLayerInfos:i}=l;let u={};const v={};i.forEach((async o=>{var i,u,d,t;const e=o.legendElements[0],r=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,a=null===(d=o.layer.renderer)||void 0===d?void 0:d.field,s=[];v[o.layer.id]=[],null===(t=null==e?void 0:e.infos)||void 0===t||t.forEach(((n,i)=>{var u;const d=null===(u=e.infos)||void 0===u?void 0:u.every((l=>"symbol-table"===l.type));if(d){const u=[];n.infos.forEach(((o,v)=>{const d=b(l.view.extent,r,a,n,i,e,o,v);u.push(d)})),v[o.layer.id].push(u)}else s.push(b(l.view.extent,r,a,n,i,e)),v[o.layer.id]=s}));const c=o=>{var i,u,d,t;const e=[],r=o.legendElements[0],a=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,s=null===(d=o.layer.renderer)||void 0===d?void 0:d.field;null===(t=null==r?void 0:r.infos)||void 0===t||t.forEach(((n,o)=>e.push(b(l.view.extent,a,s,n,o,r)))),v[o.layer.id]=e};o.children.forEach((async l=>{var n;c(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;c(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{c(l)}))}))}))}));for(const l in v){let n=u[l];n||(n=u[l]={});const o=await Promise.all(v[l]);if(o.every((l=>Array.isArray(l)))){const i=await Promise.all(o.map((async l=>(await Promise.all(l)).map((l=>l&&Object.values(l)[0])))));n[l]=i,u[l]=Object.assign({},n[l])}else{const i={};o.forEach((l=>{if(!l)return;const n=Object.keys(l)[0];i[n]=l[n]})),l&&(n[l]=i),u[l]=Object.assign({},n[l])}}return i.forEach((l=>{var o;const i=n[l.layer.id],v=l.layer.id;null===(o=null==i?void 0:i.categories)||void 0===o||o.forEach(((n,o)=>{var d;const t=Array.from(null==i?void 0:i.categories).findIndex((l=>l[0]===o));if(null==n?void 0:n.nestedInfos)null==n||n.nestedInfos.forEach(((n,o)=>{var i,v,d;const e=null===(d=null===(v=null==u?void 0:u[null===(i=null==l?void 0:l.layer)||void 0===i?void 0:i.id])||void 0===v?void 0:v[t])||void 0===d?void 0:d[o];n.count=isNaN(e)?null:e}));else{const l=null===(d=null==u?void 0:u[v])||void 0===d?void 0:d[o];n.count=isNaN(l)?null:l}}));const d=l=>{var o;const i=l.layer.id,v=n[i];null===(o=null==v?void 0:v.categories)||void 0===o||o.forEach(((l,n)=>{var o;const v=null===(o=null==u?void 0:u[i])||void 0===o?void 0:o[n];l.count=v}))};l.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{d(l)}))}))}))})),Promise.resolve(o)}function L(l,n){var o;return null===(o=null==l?void 0:l.nestedInfos)||void 0===o?void 0:o[n]}function D(l){return Array.from(l).map((l=>l[1])).every((l=>!!(null==l?void 0:l.nestedInfos)))}function I(l){var n,o,i,u;return!!(null===(u=null===(i=null===(o=null===(n=null==l?void 0:l.legendElements)||void 0===n?void 0:n[0])||void 0===o?void 0:o.infos)||void 0===i?void 0:i.every)||void 0===u?void 0:u.call(i,(l=>"symbol-table"===(null==l?void 0:l.type))))}function x(l,n){var o;return null===(o=null==l?void 0:l.categories)||void 0===o?void 0:o.get(null==n?void 0:n.title)}function g(l){const n="calcite-mode-",o=`${n}light`,i=`${n}dark`;return l.classList.contains(i)?i:o}function h(l){if(l.layerId&&l.intLegendLayerData){const n=l.layerId,o=l.intLegendLayerData,i=Object.assign(Object.assign({},u.data),{[n]:o});v.set("data",i)}}function P(n,i){const{type:u}=n;"filter"===u?function(l){var n,o;null===(o=null===(n=null==l?void 0:l.allLayerViews)||void 0===n?void 0:n.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})))||void 0===o||o.forEach((l=>{const n=S(l);l.filter=n,l.set("featureEffect",null)}))}(i):"effect"===u&&function(n,i){var u;null===(u=null==i?void 0:i.allLayerViews)||void 0===u||u.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})).forEach((async i=>{if((null==n?void 0:n.effect)&&i){const[u]=await l(["esri/layers/support/FeatureEffect"]),{includedEffect:v,excludedEffect:d}=n.effect,t=await o(d,i,"excludedEffect"),e=await o(v,i,"includedEffect"),r=S(i);i.featureEffect=new u({filter:r,includedEffect:e,excludedEffect:t}),i.set("filter",null)}}))}(n,i)}function S(l){var n;return(null==l?void 0:l.filter)||(null===(n=null==l?void 0:l.featureEffect)||void 0===n?void 0:n.filter)}function j(l,n){const o=null==l?void 0:l.fields,i=o&&o.map((l=>l.name));return!n||i&&i.includes(n)}function U(l){const n=[];return l.forEach((l=>z(l,n))),n}function z(l,n){n.push(l),l.children&&l.children.length>0&&l.children.forEach((l=>{z(l,n)}))}export{x as a,r as b,$ as c,R as d,t as e,U as f,g,P as h,u as i,d as j,s as k,a as l,I as m,m as n,O as o,N as p,o as q,e as r,v as s,D as t,h as u,p as v,E as w,w as x,L as y,A as z}
|
6
|
+
import{l}from"./p-4cd4cb85.js";import{c as n}from"./p-dcc35070.js";async function o(n,o,i){const[u]=await l(["esri/layers/effects/jsonUtils"]),{toJSON:v,fromJSON:d}=u,t=null==o?void 0:o.layer;if(!n)return(null==t?void 0:t.effect)?t.effect:(null==t?void 0:t.featureEffect)?"includedEffect"===i?t.featureEffect.includedEffect:t.featureEffect.excludedEffect:null;const e=v(n);let r;r=t.featureEffect?"includedEffect"===i?t.featureEffect.includedEffect:t.featureEffect.excludedEffect:t.effect;const a=r?v(r):null;if(!a)return d(e);let c=[...a];return e&&e.forEach((l=>{c.forEach((n=>{const{value:o}=n;if(o)o.forEach(((i,u)=>{i.type===l.type?o[u]=l:!n.value.find((l=>l.type===e[0].type))&&(n.value=[...n.value,...e])}));else{const o=!c.find((l=>l.type===n.type));!c.find((n=>n.type===l.type))&&(c=[...c,l]),o&&(c=[...c,n])}}))})),d(c)}const i=n({data:{},relationshipRampExpandStates:{}}),u=i.state,v=i;async function d(l,n,o){var i,u,v,d,t,e,r,a,c;try{const s="group"===(null===(i=null==n?void 0:n.layer)||void 0===i?void 0:i.type),f=null===(v=null===(u=null==n?void 0:n.layer)||void 0===u?void 0:u.layers)||void 0===v?void 0:v.some((l=>l.visible)),$=null===(t=null===(d=null==n?void 0:n.layer)||void 0===d?void 0:d.layers)||void 0===t?void 0:t.every((l=>!(null==l?void 0:l.legendEnabled)));await o.whenOnce((()=>"ready"===(null==l?void 0:l.state))),!s||s&&f?s&&$?await o.whenOnce((()=>{var l;return null===(l=null==n?void 0:n.layer)||void 0===l?void 0:l.loaded})):await o.whenOnce((()=>null==n?void 0:n.ready)):await o.whenOnce((()=>null==n?void 0:n.legendElements));const y=null===(e=null==n?void 0:n.legendElements)||void 0===e?void 0:e[0],m=new Map,p=n.layer,N=await l.view.whenLayerView(p);await o.whenOnce((()=>!1===(null==N?void 0:N.updating)));const O=null===(r=p.renderer)||void 0===r?void 0:r.field;return void 0!==y&&(null===(a=null==y?void 0:y.infos)||void 0===a||a.forEach((l=>{var n;if("symbol-table"===l.type){const n=[];l.infos.forEach((l=>{n.push({count:null,selected:!1,legendElementInfo:l})})),m.set(l.title,{count:null,selected:!1,legendElementInfo:l,nestedInfos:n})}else m.set(null!==(n=l.label)&&void 0!==n?n:p.id,{count:null,selected:!1,legendElementInfo:l})}))),Promise.resolve({activeLayerInfo:n,title:null===(c=null==N?void 0:N.layer)||void 0===c?void 0:c.title,categories:m,field:O,queryExpressions:[],totalCount:null,fLayerView:N,legendElement:y})}catch(l){return Promise.resolve(null)}}async function t(l,n){const o={},i=[];l.activeLayerInfos.forEach(function(l,n,o){return i=>{var u;const v=null===(u=null==i?void 0:i.layer)||void 0===u?void 0:u.type;if("feature"===v||"group"===v){const u=d(n,i,o).then((l=>l));u&&l.push(u);const v=i=>{const u=d(n,i,o).then((l=>l));u&&l.push(u)};i.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;v(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{v(l)}))}))}))}}}(i,l,n));try{return(await Promise.all(i)).forEach((l=>{var n,i;return o[null===(i=null===(n=null==l?void 0:l.activeLayerInfo)||void 0===n?void 0:n.layer)||void 0===i?void 0:i.id]=l})),Promise.resolve(o)}catch(l){return Promise.reject(null)}}function e(l){return Array.from(l).map((l=>l[1]))}function r(l,n,o,i,u){var v,d,t;return i?null===(v=null==i?void 0:i.nestedInfos)||void 0===v?void 0:v[u]:null===(d=null==l?void 0:l.categories)||void 0===d?void 0:d.get(null!==(t=null==o?void 0:o.label)&&void 0!==t?t:null==n?void 0:n.id)}function a(l){var n;return null===(n=null==u?void 0:u.data)||void 0===n?void 0:n[null==l?void 0:l.id]}async function c(n,i,u,v,d){var t,e,r,a,c;const[$,m]=await l(["esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]),{queryExpressions:p,fLayerView:N}=n;!function(l,n,o,i){var u,v,d,t;const{field:e,legendElement:r,categories:a,fLayerView:c}=l,$=null==l?void 0:l.queryExpressions;i&&Array.from(l.categories).map((l=>l[1])).forEach((l=>{var n,o;(null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected)))&&(null===(o=l.nestedInfos)||void 0===o||o.forEach((l=>{const n=e?`${e} = '${l.legendElementInfo.value}'`:null,o=n?$.indexOf(n):-1;n&&-1!==o&&$.splice(o,1)})))}));const m=null==r?void 0:r.infos,p=y(c);let N=p?s(n,c):f(n,e,o,r,m,"");const O=a?i?null===(v=null===(u=a.get(i.title))||void 0===u?void 0:u.nestedInfos)||void 0===v?void 0:v[o]:a.get(null!==(d=n.label)&&void 0!==d?d:null===(t=null==c?void 0:c.layer)||void 0===t?void 0:t.id):null;O&&(O.selected=!(null==O?void 0:O.selected));const A=m&&1===m.length,w=$.indexOf(N);if(p){const l=$.indexOf(N);0===$.length||-1===l?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]?$[0]="1=0":$&&1===$.length||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]?$[0]=null:$.splice(l,1),$.join(" OR ")}else 0===$.length||-1===w?($&&"1=0"===$[0]&&$.splice(0,1),$.push(N)):$&&1===$.length&&N===$[0]&&!A?$[0]="1=0":$&&1===$.length&&!A||$&&1===$.length&&N!==$[0]&&"1=0"===$[0]&&!A?$[0]=N:$&&1===$.length&&N===$[0]&&"1=0"===$[0]&&!A?$[0]=null:$.splice(w,1);if(i){const n=[];Array.from(l.categories).map((l=>l[1])).forEach((l=>{var o,i;(null===(o=l.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=l.nestedInfos)||void 0===i||i.forEach((l=>{e&&`${e} = '${l.legendElementInfo.value}'`&&n.push(`${e} = '${l.legendElementInfo.value}'`)})))})),n.forEach((l=>{-1===$.indexOf(l)&&$.push(l)}))}}(n,i,u,d);const O=p.every((l=>l&&l.includes("<>")))?" AND ":" OR ",A=p.join(O),w=null!==(c=null!==(e=null===(t=null==N?void 0:N.filter)||void 0===t?void 0:t.timeExtent)&&void 0!==e?e:null===(a=null===(r=null==N?void 0:N.featureEffect)||void 0===r?void 0:r.filter)||void 0===a?void 0:a.timeExtent)&&void 0!==c?c:null,{type:E}=v;if("filter"===E)N.filter=new $({where:A,timeExtent:w});else if(v.effect){const{includedEffect:l,excludedEffect:n}=v.effect,i=await o(n,N,"excludedEffect"),u=await o(l,N,"includedEffect");N.featureEffect=new m({filter:new $({where:A,timeExtent:w}),includedEffect:u,excludedEffect:i})}return Promise.resolve()}function s(l,n){const o=n?n.layer.renderer.authoringInfo:null,i=o?o.fields:null,u=[];if(!i)return"";if(l.hasOwnProperty("value"))return i.forEach((n=>{l.value!==n&&u.push(`(${l.value} > ${n} OR (${n} IS NULL AND ${l.value} <> 0 AND ${l.value} IS NOT NULL))`)})),u.join(" AND ");{const l=[];i.forEach((n=>{l.push(`${n} = 0`)}));const n=[];if(i.length>2){i.forEach((l=>{i.forEach((o=>{if(l===o)return;const u=[];i.forEach((n=>{l!==n&&o!==n&&u.push(`${l} = ${o} AND (${l} > ${n} OR ${l} >= ${n})`)})),n.push(`(${u.join(" AND ")})`)}))}));const o=[];return i.forEach((l=>{o.push(`${l} IS NULL`)})),`(${l.join(" AND ")}) OR (${n.join(" OR ")}) OR (${o.join(" AND ")})`}{const n=[];i.forEach((o=>{i.forEach((i=>{o!==i&&(n.push(`${o} = ${i}`),n.push(`(${l.join(" AND ")})`))}))}));const o=[];return i.forEach((l=>{i.forEach((n=>{l!==n&&o.push(`(${l} = 0 AND ${n} IS NULL) OR (${l} IS NULL AND ${n} IS NULL)`)}))})),`(${n.join(" OR ")}) OR (${o.join(" OR ")})`}}}function f(l,n,o,i,u,v){const{value:d}=l;if("symbol-table"===(null==i?void 0:i.type)){if(!l.hasOwnProperty("value")||Array.isArray(l.value)&&1===(null==u?void 0:u.length)){if((null==u?void 0:u[0].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[0].value)&&(null==u?void 0:u[(null==u?void 0:u.length)-2])&&(null==u?void 0:u[(null==u?void 0:u.length)-2].hasOwnProperty("value"))&&Array.isArray(null==u?void 0:u[(null==u?void 0:u.length)-2].value))return v?`((${n}/${v}) > ${null==u?void 0:u[0].value[1]}) OR ((${n}/${v}) < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]}) OR ${v} = 0 OR ${v} IS NULL`:`${n} > ${null==u?void 0:u[0].value[1]} OR ${n} < ${null==u?void 0:u[(null==u?void 0:u.length)-2].value[0]} OR ${n} IS NULL`;if(1===(null==u?void 0:u.length))return"1=0";{const l=[];null==u||u.forEach((o=>{if(null==o?void 0:o.value){const{value:i}=o,u=-1!==i.indexOf("'")?i.split("'").join("''"):null,v=u?`${n} <> '${u}'`:isNaN(i)||"string"==typeof i&&!i.trim()?`${n} <> '${i}'`:`${n} <> ${i} AND ${n} <> '${i}'`;l.push(v)}}));const o=l.join(" AND ");return n&&o?`${o} OR ${n} IS NULL`:""}}{const i=-1!==d.indexOf("'")?d.split("'").join("''"):null,t=Array.isArray(l.value),e=(null==u?void 0:u.length)-1===o,r=!(null==u?void 0:u[(null==u?void 0:u.length)-1].hasOwnProperty("value")),a=o===(null==u?void 0:u.length)-2;return t?v?e||r&&a?`(${n}/${v}) >= ${d[0]} AND (${n}/${v}) <= ${l.value[1]}`:`(${n}/${v}) > ${d[0]} AND (${n}/${v}) <= ${l.value[1]}`:e||r&&a?`${n} >= ${d[0]} AND ${n} <= ${d[1]}`:`${n} > ${d[0]} AND ${n} <= ${d[1]}`:1===(null==u?void 0:u.length)&&n?isNaN(d)||!d.trim().length?`${n} <> '${d}'`:`${n} <> ${d} OR ${n} <> '${d}'`:i?`${n} = '${i}'`:isNaN(d)||!d.trim().length?`${n} = '${d}'`:`${n} = ${d} OR ${n} = '${d}'`}}return""}function $(l){return Array.isArray(l)?l.every((l=>!l.selected)):l&&Array.from(l.categories.entries()).every((l=>!l[1].selected))&&"1=0"!==l.queryExpressions[0]}function y(l){var n,o,i;return"predominance"===(null===(i=null===(o=null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.renderer)||void 0===o?void 0:o.authoringInfo)||void 0===i?void 0:i.type)}function m(l){var n;return"relationship-ramp"===(null===(n=null==l?void 0:l.legendElements[1])||void 0===n?void 0:n.type)}function p(l,n,o){var i,u,v,d,t,e,r,a,c,s,f,$,m,p,N,O,A,w,E;const b=l.layer,R=null===(i=null==b?void 0:b.renderer)||void 0===i?void 0:i.field,L=null==n?void 0:n.type,D=null==l?void 0:l.layerView,I=null===(v=null===(u=null==D?void 0:D.layer)||void 0===u?void 0:u.renderer)||void 0===v?void 0:v.classBreakInfos,x=(null===(t=null===(d=null==D?void 0:D.layer)||void 0===d?void 0:d.renderer)||void 0===t?void 0:t.uniqueValueInfos)&&R,g="size-ramp"===L,h="color-ramp"===L,P="opacity-ramp"===L,S="heatmap-ramp"===L,U=D&&I&&I.length>1,z=null===(a=null===(r=null===(e=null==D?void 0:D.layer)||void 0===e?void 0:e.renderer)||void 0===r?void 0:r.authoringInfo)||void 0===a?void 0:a.type,F="class-breaks-color"===z,k="class-breaks-size"===z,q=1===(null===(c=null==n?void 0:n.infos)||void 0===c?void 0:c.length)&&!R,V="relationship"===z&&"size-ramp"!==(null==n?void 0:n.type)&&"symbol-table"!==(null==n?void 0:n.type),C="feature"===(null===(s=null==l?void 0:l.layer)||void 0===s?void 0:s.type),J=C&&R&&!h&&!g&&U,T=!(!C||!R||h||g||U),M=!!(T||y(D)&&!g||F&&R||k&&R||q&&!R&&null!==R||V||x),B=(null===(f=null==l?void 0:l.layer)||void 0===f?void 0:f.featureReduction)&&"size-ramp"===(null===(m=null===($=null==l?void 0:l.legendElements)||void 0===$?void 0:$[o])||void 0===m?void 0:m.type),G="symbol-table"===(null==n?void 0:n.type)&&1===(null===(p=null==n?void 0:n.infos)||void 0===p?void 0:p.length),H=!(null==l?void 0:l.legendElements.every((l=>"color-ramp"!==l.type))),K=!(null==l?void 0:l.legendElements.every((l=>"size-ramp"!==l.type))),Q=G&&H,W=G&&K,X=null===(N=null==n?void 0:n.infos)||void 0===N?void 0:N.every((l=>"number"==typeof l.value)),Y="symbol-table"===(null===(A=null===(O=null==l?void 0:l.legendElements)||void 0===O?void 0:O[0])||void 0===A?void 0:A.type)&&"color-ramp"===(null===(E=null===(w=null==l?void 0:l.legendElements)||void 0===w?void 0:w[1])||void 0===E?void 0:E.type),Z="dot-density"===z,_=j(null==l?void 0:l.layer,R);return!(!C||B||P||S||Q||W||X||Y||Z||!_)&&(I?J||M:T||M)}function N(l){var n,o,i,u,v;return l.queryExpressions=[],(null===(o=null===(n=null==l?void 0:l.fLayerView)||void 0===n?void 0:n.filter)||void 0===o?void 0:o.where)&&(l.fLayerView.filter.where=""),(null===(v=null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.featureEffect)||void 0===u?void 0:u.filter)||void 0===v?void 0:v.where)&&(l.fLayerView.featureEffect=null),l.categories.forEach((l=>{l.selected=!1})),l}function O(l,n){var o,i,u,v,d,t,e,r,a,c,s;const f=l.categories.get(n);null===(o=null==f?void 0:f.nestedInfos)||void 0===o||o.forEach((n=>{const o=l.queryExpressions.indexOf(`${l.field} = '${n.legendElementInfo.value}'`);-1!==o&&l.queryExpressions.splice(o,1),n.selected=!1}));const $=[],y=Array.from(l.categories).map((l=>l[1]));y.forEach((n=>{var o,i;(null===(o=n.nestedInfos)||void 0===o?void 0:o.every((l=>!l.selected)))&&(null===(i=n.nestedInfos)||void 0===i||i.forEach((n=>{$.push(`${l.field} = '${n.legendElementInfo.value}'`)})))})),$.forEach((n=>{-1===l.queryExpressions.indexOf(n)&&l.queryExpressions.push(n)}));let m=l.queryExpressions.join(" OR ");const p=y.every((l=>{var n;return null===(n=l.nestedInfos)||void 0===n?void 0:n.every((l=>!l.selected))}));return p?((null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.filter)||void 0===u?void 0:u.where)&&(l.fLayerView.filter.where=""),(null===(t=null===(d=null===(v=null==l?void 0:l.fLayerView)||void 0===v?void 0:v.featureEffect)||void 0===d?void 0:d.filter)||void 0===t?void 0:t.where)&&(l.fLayerView.featureEffect=null),l.queryExpressions=[]):((null===(r=null===(e=null==l?void 0:l.fLayerView)||void 0===e?void 0:e.filter)||void 0===r?void 0:r.where)&&(l.fLayerView.filter.where=m),(null===(s=null===(c=null===(a=null==l?void 0:l.fLayerView)||void 0===a?void 0:a.featureEffect)||void 0===c?void 0:c.filter)||void 0===s?void 0:s.where)&&(l.fLayerView.featureEffect.filter.where=m)),l}async function A(l,n,o){var i,u;const v=l.fLayerView.createQuery();if(o)if(o.nestedInfos.every((l=>!l.selected))){const n=o.nestedInfos.map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");v.where=n}else{const n=o.nestedInfos.filter((l=>l.selected)).map((n=>`${l.field} = '${n.legendElementInfo.value}'`)).join(" OR ");v.where=n}else{const n=l.queryExpressions.join(" OR ");v.where=n}try{const{extent:o}=await(null===(u=null===(i=null==l?void 0:l.fLayerView)||void 0===i?void 0:i.layer)||void 0===u?void 0:u.queryExtent(v));await n.goTo(o)}catch(l){}}function w(l){return l.map((l=>null==l?void 0:l.count)).reduce(((l,n)=>l+n))}function E(l){return l.map((l=>{var n;return null===(n=null==l?void 0:l.nestedInfos)||void 0===n?void 0:n.map((l=>l.count)).reduce(((l,n)=>l+n))})).reduce(((l,n)=>l+n))}async function b(l,n,o,i,u,v,d,t){var e,r,a;if(!n)return;if(!j(null==n?void 0:n.layer,o))return;const c="feature"===(null===(e=null==n?void 0:n.layer)||void 0===e?void 0:e.type)?n.createQuery():null,$=y(n)?s(i,n):i.type?f(d,o,t,i,i.infos):f(i,o,u,v,v.infos);c&&$&&(c.where="1=0"===$?"1=1":$,c.geometry=l);try{const l=c?await n.queryFeatureCount(c):null;return Promise.resolve({[null!==(r=i.label)&&void 0!==r?r:null===(a=null==n?void 0:n.layer)||void 0===a?void 0:a.id]:l})}catch(l){console.error("FAILURE AT 'getInfoCount': ",l)}return Promise.resolve(null)}async function R(l,n){let o=Object.assign({},n);const{activeLayerInfos:i}=l;let u={};const v={};i.forEach((async o=>{var i,u,d,t;const e=o.legendElements[0],r=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,a=null===(d=o.layer.renderer)||void 0===d?void 0:d.field,c=[];v[o.layer.id]=[],null===(t=null==e?void 0:e.infos)||void 0===t||t.forEach(((n,i)=>{var u;const d=null===(u=e.infos)||void 0===u?void 0:u.every((l=>"symbol-table"===l.type));if(d){const u=[];n.infos.forEach(((o,v)=>{const d=b(l.view.extent,r,a,n,i,e,o,v);u.push(d)})),v[o.layer.id].push(u)}else c.push(b(l.view.extent,r,a,n,i,e)),v[o.layer.id]=c}));const s=o=>{var i,u,d,t;const e=[],r=o.legendElements[0],a=null===(u=n[null===(i=null==o?void 0:o.layer)||void 0===i?void 0:i.id])||void 0===u?void 0:u.fLayerView,c=null===(d=o.layer.renderer)||void 0===d?void 0:d.field;null===(t=null==r?void 0:r.infos)||void 0===t||t.forEach(((n,o)=>e.push(b(l.view.extent,a,c,n,o,r)))),v[o.layer.id]=e};o.children.forEach((async l=>{var n;s(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;s(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{s(l)}))}))}))}));for(const l in v){let n=u[l];n||(n=u[l]={});const o=await Promise.all(v[l]);if(o.every((l=>Array.isArray(l)))){const i=await Promise.all(o.map((async l=>(await Promise.all(l)).map((l=>l&&Object.values(l)[0])))));n[l]=i,u[l]=Object.assign({},n[l])}else{const i={};o.forEach((l=>{if(!l)return;const n=Object.keys(l)[0];i[n]=l[n]})),l&&(n[l]=i),u[l]=Object.assign({},n[l])}}return i.forEach((l=>{var o;const i=n[l.layer.id],v=l.layer.id;null===(o=null==i?void 0:i.categories)||void 0===o||o.forEach(((n,o)=>{var d;const t=Array.from(null==i?void 0:i.categories).findIndex((l=>l[0]===o));if(null==n?void 0:n.nestedInfos)null==n||n.nestedInfos.forEach(((n,o)=>{var i,v,d;const e=null===(d=null===(v=null==u?void 0:u[null===(i=null==l?void 0:l.layer)||void 0===i?void 0:i.id])||void 0===v?void 0:v[t])||void 0===d?void 0:d[o];n.count=isNaN(e)?null:e}));else{const l=null===(d=null==u?void 0:u[v])||void 0===d?void 0:d[o];n.count=isNaN(l)?null:l}}));const d=l=>{var o;const i=l.layer.id,v=n[i];null===(o=null==v?void 0:v.categories)||void 0===o||o.forEach(((l,n)=>{var o;const v=null===(o=null==u?void 0:u[i])||void 0===o?void 0:o[n];l.count=v}))};l.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{var n;d(l),(null===(n=null==l?void 0:l.children)||void 0===n?void 0:n.length)>0&&l.children.forEach((l=>{d(l)}))}))}))})),Promise.resolve(o)}function L(l,n){var o;return null===(o=null==l?void 0:l.nestedInfos)||void 0===o?void 0:o[n]}function D(l){return Array.from(l).map((l=>l[1])).every((l=>!!(null==l?void 0:l.nestedInfos)))}function I(l){var n,o,i,u;return!!(null===(u=null===(i=null===(o=null===(n=null==l?void 0:l.legendElements)||void 0===n?void 0:n[0])||void 0===o?void 0:o.infos)||void 0===i?void 0:i.every)||void 0===u?void 0:u.call(i,(l=>"symbol-table"===(null==l?void 0:l.type))))}function x(l,n){var o;return null===(o=null==l?void 0:l.categories)||void 0===o?void 0:o.get(null==n?void 0:n.title)}function g(l){const n="calcite-mode-",o=`${n}light`,i=`${n}dark`;return l.classList.contains(i)?i:o}function h(l){if(l.layerId&&l.intLegendLayerData){const n=l.layerId,o=l.intLegendLayerData,i=Object.assign(Object.assign({},u.data),{[n]:o});v.set("data",i)}}function P(n,i){const{type:u}=n;"filter"===u?function(l){var n,o;null===(o=null===(n=null==l?void 0:l.allLayerViews)||void 0===n?void 0:n.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})))||void 0===o||o.forEach((l=>{const n=S(l);l.filter=n,l.set("featureEffect",null)}))}(i):"effect"===u&&function(n,i){var u;null===(u=null==i?void 0:i.allLayerViews)||void 0===u||u.filter((l=>{var n;return"feature"===(null===(n=null==l?void 0:l.layer)||void 0===n?void 0:n.type)})).forEach((async i=>{if((null==n?void 0:n.effect)&&i){const[u]=await l(["esri/layers/support/FeatureEffect"]),{includedEffect:v,excludedEffect:d}=n.effect,t=await o(d,i,"excludedEffect"),e=await o(v,i,"includedEffect"),r=S(i);i.featureEffect=new u({filter:r,includedEffect:e,excludedEffect:t}),i.set("filter",null)}}))}(n,i)}function S(l){var n;return(null==l?void 0:l.filter)||(null===(n=null==l?void 0:l.featureEffect)||void 0===n?void 0:n.filter)}function j(l,n){const o=null==l?void 0:l.fields,i=o&&o.map((l=>l.name));return!n||i&&i.includes(n)}function U(l){const n=[];return l.forEach((l=>z(l,n))),n}function z(l,n){n.push(l),l.children&&l.children.length>0&&l.children.forEach((l=>{z(l,n)}))}export{x as a,r as b,$ as c,R as d,t as e,U as f,g,P as h,u as i,d as j,c as k,a as l,I as m,m as n,O as o,N as p,o as q,e as r,v as s,D as t,h as u,p as v,E as w,w as x,L as y,A as z}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,h as e,H as n,F as r,g as i}from"./p-f4c4a2b7.js";import{c as o}from"./p-dcc35070.js";import{l as a}from"./p-65581d83.js";import{g as s}from"./p-09d62c22.js";import"./p-6a68306c.js";import"./p-d4056c1c.js";import"./p-af2c8aa9.js";const{state:u,onChange:l}=o({timeInfoConfigItems:[],filterMode:{type:"filter"},view:null,timeSlider:null,timeInfoItems:[],selectedTimeInfoItem:null,loading:!0});let c;function f(t){return"function"==typeof c[t]?c[t]=c[t](globalThis):c[t]}function h(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const e=function(t){if(function(t){return"Int8Array"===t?.constructor?.name}(t)||function(t){return"Uint8Array"===t?.constructor?.name}(t)||function(t){return"Uint8ClampedArray"===t?.constructor?.name}(t)||function(t){return"Int16Array"===t?.constructor?.name}(t)||function(t){return"Uint16Array"===t?.constructor?.name}(t)||function(t){return"Int32Array"===t?.constructor?.name}(t)||function(t){return"Uint32Array"===t?.constructor?.name}(t)||function(t){return"Float32Array"===t?.constructor?.name}(t)||function(t){return"Float64Array"===t?.constructor?.name}(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[n,r]of t)e.set(n,h(r));return e}if(t instanceof Set){const e=new Set;for(const n of t)e.add(h(n));return e}return null}(t);if(null!=e)return e;if(function(t){return"function"==typeof t.clone}(t))return t.clone();if(function(t){return"function"==typeof t.map&&"function"==typeof t.forEach}(t))return t.map(h);if(function(t){return"function"==typeof t.notifyChange&&"function"==typeof t.watch}(t))return t.clone();const n={};for(const e of Object.getOwnPropertyNames(t))n[e]=h(t[e]);return n}function d(t,e,n){return e?Object.keys(e).reduce(((t,r)=>{let i=t[r],o=e[r];return i===o?t:void 0===i?(t[r]=h(o),t):(Array.isArray(o)||Array.isArray(t)?(i=t[r]=i?Array.isArray(i)?i.concat():[i]:[],o&&(Array.isArray(o)||(o=[o]),n?o.forEach((t=>{i.includes(t)||i.push(t)})):t[r]=o.concat())):o&&"object"==typeof o?t[r]=d(i,o,n):t.hasOwnProperty(r)&&!e.hasOwnProperty(r)||(t[r]=o),t)}),t||{}):t}c=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},f.add=(t,e,n,r)=>((r||void 0===c[t])&&(c[t]=e),n&&f(t)),f.cache=c,f.add("big-integer-warning-enabled",!0),f.add("esri-deprecation-warnings",!0),f.add("esri-tests-disable-screenshots",!1),f.add("esri-tests-use-full-window",!1),f.add("esri-tests-post-to-influx",!0),(()=>{f.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(f.add("host-browser",t),f.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),f.add("dom",t),f("host-browser")){const t=navigator,e=t.userAgent,n=t.appVersion,r=parseFloat(n);if(f.add("wp",parseFloat(e.split("Windows Phone")[1])||void 0),f.add("msapp",parseFloat(e.split("MSAppHost/")[1])||void 0),f.add("khtml",n.includes("Konqueror")?r:void 0),f.add("edge",parseFloat(e.split("Edge/")[1])||void 0),f.add("opr",parseFloat(e.split("OPR/")[1])||void 0),f.add("webkit",!f("wp")&&!f("edge")&&parseFloat(e.split("WebKit/")[1])||void 0),f.add("chrome",!f("edge")&&!f("opr")&&parseFloat(e.split("Chrome/")[1])||void 0),f.add("android",!f("wp")&&parseFloat(e.split("Android ")[1])||void 0),f.add("safari",!n.includes("Safari")||f("wp")||f("chrome")||f("android")||f("edge")||f("opr")?void 0:parseFloat(n.split("Version/")[1])),f.add("mac",n.includes("Macintosh")),!f("wp")&&/(iPhone|iPod|iPad)/.test(e)){const t=RegExp.$1.replace(/P/,"p"),n=/OS ([\d_]+)/.test(e)?RegExp.$1:"1",r=parseFloat(n.replace(/_/,".").replaceAll("_",""));f.add(t,r),f.add("ios",r)}f("webkit")||(!e.includes("Gecko")||f("wp")||f("khtml")||f("edge")||f.add("mozilla",r),f("mozilla")&&f.add("ff",parseFloat(e.split("Firefox/")[1]||e.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),n=/iPhone/i.test(t);e&&f.add("esri-mobile",e),n&&f.add("esri-iPhone",n),f.add("esri-geolocation",!!navigator.geolocation)}f.add("esri-wasm","WebAssembly"in globalThis),f.add("esri-performance-mode-frames-between-render",20),f.add("esri-force-performance-mode",!1),f.add("esri-shared-array-buffer",(()=>{const t="SharedArrayBuffer"in globalThis,e=!1===globalThis.crossOriginIsolated;return t&&!e})),f.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([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])))),f.add("esri-atomics","Atomics"in globalThis),f.add("esri-workers","Worker"in globalThis),f.add("web-feat:cache","caches"in globalThis),f.add("esri-workers-arraybuffer-transfer",!f("safari")||Number(f("safari"))>=12),f.add("workers-pool-size",8),f.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),f.add("featurelayer-simplify-payload-size-factors",[1,1,4]),f.add("featurelayer-fast-triangulation-enabled",!0),f.add("featurelayer-animation-enabled",!0),f.add("featurelayer-snapshot-enabled",!0),f.add("featurelayer-snapshot-point-min-threshold",8e4),f.add("featurelayer-snapshot-point-max-threshold",4e5),f.add("featurelayer-snapshot-point-coverage",.1),f.add("featurelayer-query-max-depth",4),f.add("featurelayer-query-pausing-enabled",!1),f.add("featurelayer-advanced-symbols",!1),f.add("featurelayer-pbf",!0),f.add("featurelayer-pbf-statistics",!1),f.add("feature-layers-workers",!0),f.add("feature-polyline-generalization-factor",1),f.add("mapview-transitions-duration",200),f.add("mapview-essential-goto-duration",200),f.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),f.add("mapserver-pbf-version-support",10.81),f.add("mapservice-popup-identify-max-tolerance",20),f("host-webworker")||f("host-browser")&&(f.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),f.add("esri-image-decode",(()=>{if("decode"in new Image){const t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void t.decode().then((()=>{f.add("esri-image-decode",!0,!0,!0)})).catch((()=>{f.add("esri-image-decode",!1,!0,!0)}))}return!1})),f.add("esri-url-encodes-apostrophe",(()=>{const t=window.document.createElement("a");return t.href="?'",t.href.includes("?%27")})))})();const p={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.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}};globalThis.esriConfig&&(function(t,e,n=!1){d(p,e,n)}(0,globalThis.esriConfig,!0),delete p.has),p.assetsPath||(p.assetsPath="https://js.arcgis.com/4.30/@arcgis/core/assets",p.defaultAssetsPath=p.assetsPath);const m={info:0,warn:1,error:2,none:3};class g{constructor(t){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=t.level&&(this.level=t.level),null!=t.writer&&(this.writer=t.writer),this._module=t.module,g._loggers.set(this.module,this);const e=this.module.lastIndexOf(".");-1!==e&&(this._parent=g.getLogger(this.module.slice(0,e)))}get module(){return this._module}get parent(){return this._parent}error(...t){this._log("error","always",...t)}warn(...t){this._log("warn","always",...t)}info(...t){this._log("info","always",...t)}errorOnce(...t){this._log("error","once",...t)}warnOnce(...t){this._log("warn","once",...t)}infoOnce(...t){this._log("info","once",...t)}errorOncePerTick(...t){this._log("error","oncePerTick",...t)}warnOncePerTick(...t){this._log("warn","oncePerTick",...t)}infoOncePerTick(...t){this._log("info","oncePerTick",...t)}get test(){}static get test(){}static getLogger(t){return g._loggers.get(t="string"!=typeof t?t.declaredClass:t)||new g({module:t})}_log(t,e,...n){if(this._matchLevel(t)){if("always"!==e&&!g._throttlingDisabled){const r=function(...t){return function(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}(JSON.stringify(t,((t,e)=>"object"!=typeof e||Array.isArray(e)?e:"[Object]")))}(n),i=this._loggedMessages[t].get(r);if("once"===e&&null!=i||"oncePerTick"===e&&i&&i>=g._tickCounter)return;this._loggedMessages[t].set(r,g._tickCounter),g._scheduleTickCounterIncrement()}for(const e of p.log.interceptors)if(e(t,this.module,...n))return;this._inheritedWriter()(t,this.module,...n)}}_parentWithMember(t,e){let n=this;for(;null!=n;){const e=n[t];if(null!=e)return e;n=n.parent}return e}_inheritedWriter(){return this._parentWithMember("writer",v)}_matchLevel(t){return m[this._parentWithMember("level",p.log.level||"warn")]<=m[t]}static _scheduleTickCounterIncrement(){g._tickCounterScheduled||(g._tickCounterScheduled=!0,Promise.resolve().then((()=>{g._tickCounter++,g._tickCounterScheduled=!1})))}}function v(t,e,...n){console[t](`[${e}]`,...n)}g._loggers=new Map,g._tickCounter=0,g._tickCounterScheduled=!1,g._throttlingDisabled=!1;class w{constructor(t,e,n){this.name=t,this.details=n,this.message=(e&&function(t,e){return t.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,((t,n)=>{if(""===n)return"$";const r=function(t,e){if(null!=e)return e[t]||function(t,e,n){let r=n;for(const e of t){if(null==r)return;if(!(e in r))return void 0;r=r[e]}return r}(t.split("."),0,e)}(n,e);return(r??"").toString()}))}(e,n))??""}toString(){return"["+this.name+"]: "+this.message}}class y extends w{constructor(t,e,n){super(t,e,n)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((t,e)=>{if(e&&"object"==typeof e&&"function"==typeof e.toJSON)return e;try{return h(e)}catch(t){return"[object]"}})))}}catch(t){throw g.getLogger("esri.core.Error").error(t),t}return{name:this.name,message:this.message,details:this.details}}static fromJSON(t){return new y(t.name,t.message,t.details)}}y.prototype.type="error";const b={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 M(t){return b[t]??b[t.toLowerCase()]}function x(t,e,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?t+(e-t)*r:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function k(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const T=k();function E(t,e,n){return[t,e,n]}function S(){return E(1,1,1)}function _(){return E(1,0,0)}function F(){return E(0,1,0)}function A(){return E(0,0,1)}Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:T,clone:function(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},create:k,createView:function(t,e){return new Float32Array(t,e,16)},fromValues:function(t,e,n,r,i,o,a,s,u,l,c,f,h,d,p,m){const g=new Float32Array(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=u,g[9]=l,g[10]=c,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=m,g}},Symbol.toStringTag,{value:"Module"}));const I=S(),O=_(),j=F(),N=A();Object.freeze(Object.defineProperty({__proto__:null,ONES:I,UNIT_X:O,UNIT_Y:j,UNIT_Z:N,ZEROS:[0,0,0],clone:function(t){return[t[0],t[1],t[2]]},create:function(){return[0,0,0]},createView:function(t,e){return new Float64Array(t,e,3)},fromArray:function(t,e=[0,0,0]){const n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:E,ones:S,unitX:_,unitY:F,unitZ:A,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}));let P=1e-6;function $(){return P}const R=Math.random,q=Math.PI/180,U=180/Math.PI;function C(t,e,n,r,i,o,a,s,u,l,c,f,h,d,p,m,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=l,t[9]=c,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=m,t[15]=g,t}function D(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 z(t,e){if(t===e){const n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}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 W(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],w=n*s-r*a,y=n*u-i*a,b=n*l-o*a,M=r*u-i*s,x=r*l-o*s,k=i*l-o*u,T=c*m-f*p,E=c*g-h*p,S=c*v-d*p,_=f*g-h*m,F=f*v-d*m,A=h*v-d*g;let I=w*A-y*F+b*_+M*S-x*E+k*T;return I?(I=1/I,t[0]=(s*A-u*F+l*_)*I,t[1]=(i*F-r*A-o*_)*I,t[2]=(m*k-g*x+v*M)*I,t[3]=(h*x-f*k-d*M)*I,t[4]=(u*S-a*A-l*E)*I,t[5]=(n*A-i*S+o*E)*I,t[6]=(g*b-p*k-v*y)*I,t[7]=(c*k-h*b+d*y)*I,t[8]=(a*F-s*S+l*T)*I,t[9]=(r*S-n*F-o*T)*I,t[10]=(p*x-m*b+v*w)*I,t[11]=(f*b-c*x-d*w)*I,t[12]=(s*E-a*_-u*T)*I,t[13]=(n*_-r*E+i*T)*I,t[14]=(m*y-p*M-g*w)*I,t[15]=(c*M-f*y+h*w)*I,t):null}function J(t,e,n){const r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],w=e[15];let y=n[0],b=n[1],M=n[2],x=n[3];return t[0]=y*r+b*s+M*f+x*m,t[1]=y*i+b*u+M*h+x*g,t[2]=y*o+b*l+M*d+x*v,t[3]=y*a+b*c+M*p+x*w,y=n[4],b=n[5],M=n[6],x=n[7],t[4]=y*r+b*s+M*f+x*m,t[5]=y*i+b*u+M*h+x*g,t[6]=y*o+b*l+M*d+x*v,t[7]=y*a+b*c+M*p+x*w,y=n[8],b=n[9],M=n[10],x=n[11],t[8]=y*r+b*s+M*f+x*m,t[9]=y*i+b*u+M*h+x*g,t[10]=y*o+b*l+M*d+x*v,t[11]=y*a+b*c+M*p+x*w,y=n[12],b=n[13],M=n[14],x=n[15],t[12]=y*r+b*s+M*f+x*m,t[13]=y*i+b*u+M*h+x*g,t[14]=y*o+b*l+M*d+x*v,t[15]=y*a+b*c+M*p+x*w,t}function L(t,e,n){const r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,l=o+o,c=r*s,f=r*u,h=r*l,d=i*u,p=i*l,m=o*l,g=a*s,v=a*u,w=a*l;return t[0]=1-(d+m),t[1]=f+w,t[2]=h-v,t[3]=0,t[4]=f-w,t[5]=1-(c+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:R,equals:function(t,e){return Math.abs(t-e)<=P*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:$,setEpsilon:function(t){P=t},toDegree:function(t){return t*U},toRadian:function(t){return t*q}},Symbol.toStringTag,{value:"Module"}));const V=[0,0,0];function B(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-d*g)-f*(u*v-l*g)+m*(u*d-l*h),t[1]=-(r*(h*v-d*g)-f*(i*v-o*g)+m*(i*d-o*h)),t[2]=r*(u*v-l*g)-s*(i*v-o*g)+m*(i*l-o*u),t[3]=-(r*(u*d-l*h)-s*(i*d-o*h)+f*(i*l-o*u)),t[4]=-(a*(h*v-d*g)-c*(u*v-l*g)+p*(u*d-l*h)),t[5]=n*(h*v-d*g)-c*(i*v-o*g)+p*(i*d-o*h),t[6]=-(n*(u*v-l*g)-a*(i*v-o*g)+p*(i*l-o*u)),t[7]=n*(u*d-l*h)-a*(i*d-o*h)+c*(i*l-o*u),t[8]=a*(f*v-d*m)-c*(s*v-l*m)+p*(s*d-l*f),t[9]=-(n*(f*v-d*m)-c*(r*v-o*m)+p*(r*d-o*f)),t[10]=n*(s*v-l*m)-a*(r*v-o*m)+p*(r*l-o*s),t[11]=-(n*(s*d-l*f)-a*(r*d-o*f)+c*(r*l-o*s)),t[12]=-(a*(f*g-h*m)-c*(s*g-u*m)+p*(s*h-u*f)),t[13]=n*(f*g-h*m)-c*(r*g-i*m)+p*(r*h-i*f),t[14]=-(n*(s*g-u*m)-a*(r*g-i*m)+p*(r*u-i*s)),t[15]=n*(s*h-u*f)-a*(r*h-i*f)+c*(r*u-i*s),t},copy:function(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},determinant:function(t){const e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],f=t[10],h=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*o)*(f*g-h*m)-(e*s-r*o)*(c*g-h*p)+(e*u-i*o)*(c*m-f*p)+(n*s-r*a)*(l*g-h*d)-(n*u-i*a)*(l*m-f*d)+(r*u-i*s)*(l*p-c*d)},equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15],w=e[0],y=e[1],b=e[2],M=e[3],x=e[4],k=e[5],T=e[6],E=e[7],S=e[8],_=e[9],F=e[10],A=e[11],I=e[12],O=e[13],j=e[14],N=e[15],P=$();return Math.abs(n-w)<=P*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(r-y)<=P*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(i-b)<=P*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-M)<=P*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-x)<=P*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(s-k)<=P*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(u-T)<=P*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(l-E)<=P*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(c-S)<=P*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-_)<=P*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(h-F)<=P*Math.max(1,Math.abs(h),Math.abs(F))&&Math.abs(d-A)<=P*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-I)<=P*Math.max(1,Math.abs(p),Math.abs(I))&&Math.abs(m-O)<=P*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(g-j)<=P*Math.max(1,Math.abs(g),Math.abs(j))&&Math.abs(v-N)<=P*Math.max(1,Math.abs(v),Math.abs(N))},exactEquals:function(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]},frob:function(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)},fromQuat:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,f=r*s,h=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-f-p,t[1]=c+v,t[2]=h-g,t[3]=0,t[4]=c-v,t[5]=1-l-p,t[6]=d+m,t[7]=0,t[8]=h+g,t[9]=d-m,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=V,r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=2*(s*a+c*r+u*o-l*i)/f,n[1]=2*(u*a+c*i+l*r-s*o)/f,n[2]=2*(l*a+c*o+s*i-u*r)/f):(n[0]=2*(s*a+c*r+u*o-l*i),n[1]=2*(u*a+c*i+l*r-s*o),n[2]=2*(l*a+c*o+s*i-u*r)),L(t,e,n),t},fromRotation:function(t,e,n){if(0===e)return D(t);let r,i,o,a=n[0],s=n[1],u=n[2],l=Math.sqrt(a*a+s*s+u*u);return l<$()?null:(l=1/l,a*=l,s*=l,u*=l,r=Math.sin(e),i=Math.cos(e),o=1-i,t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromRotationTranslation:L,fromRotationTranslationScale:function(t,e,n,r){const i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,l=o+o,c=a+a,f=i*u,h=i*l,d=i*c,p=o*l,m=o*c,g=a*c,v=s*u,w=s*l,y=s*c,b=r[0],M=r[1],x=r[2];return t[0]=(1-(p+g))*b,t[1]=(h+y)*b,t[2]=(d-w)*b,t[3]=0,t[4]=(h-y)*M,t[5]=(1-(f+g))*M,t[6]=(m+v)*M,t[7]=0,t[8]=(d+w)*x,t[9]=(m-v)*x,t[10]=(1-(f+p))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,n,r,i){const o=e[0],a=e[1],s=e[2],u=e[3],l=o+o,c=a+a,f=s+s,h=o*l,d=o*c,p=o*f,m=a*c,g=a*f,v=s*f,w=u*l,y=u*c,b=u*f,M=r[0],x=r[1],k=r[2],T=i[0],E=i[1],S=i[2],_=(1-(m+v))*M,F=(d+b)*M,A=(p-y)*M,I=(d-b)*x,O=(1-(h+v))*x,j=(g+w)*x,N=(p+y)*k,P=(g-w)*k,$=(1-(h+m))*k;return t[0]=_,t[1]=F,t[2]=A,t[3]=0,t[4]=I,t[5]=O,t[6]=j,t[7]=0,t[8]=N,t[9]=P,t[10]=$,t[11]=0,t[12]=n[0]+T-(_*T+I*E+N*S),t[13]=n[1]+E-(F*T+O*E+P*S),t[14]=n[2]+S-(A*T+j*E+$*S),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:function(t,e){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]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromXRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,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},frustum:function(t,e,n,r,i,o,a){const s=1/(n-e),u=1/(i-r),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],l=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+l*l+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]},identity:D,invert:W,invertOrIdentity:function(t,e){return W(t,e)||D(t),t},isOrthoNormal:function(t){const e=$(),n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],u=t[8],l=t[9],c=t[10];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(r*r+a*a+l*l))<=e&&Math.abs(1-(i*i+s*s+c*c))<=e},lookAt:function(t,e,n,r){const i=e[0],o=e[1],a=e[2];let s=i-n[0],u=o-n[1],l=a-n[2];const c=$();if(Math.abs(s)<c&&Math.abs(u)<c&&Math.abs(l)<c)return void D(t);let f=1/Math.sqrt(s*s+u*u+l*l);s*=f,u*=f,l*=f;const h=r[0],d=r[1],p=r[2];let m=d*l-p*u,g=p*s-h*l,v=h*u-d*s;f=Math.sqrt(m*m+g*g+v*v),f?(f=1/f,m*=f,g*=f,v*=f):(m=0,g=0,v=0);let w=u*v-l*g,y=l*m-s*v,b=s*g-u*m;f=Math.sqrt(w*w+y*y+b*b),f?(f=1/f,w*=f,y*=f,b*=f):(w=0,y=0,b=0),t[0]=m,t[1]=w,t[2]=s,t[3]=0,t[4]=g,t[5]=y,t[6]=u,t[7]=0,t[8]=v,t[9]=b,t[10]=l,t[11]=0,t[12]=-(m*i+g*o+v*a),t[13]=-(w*i+y*o+b*a),t[14]=-(s*i+u*o+l*a),t[15]=1},mul:J,multiply:J,multiplyScalar:function(t,e,n){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]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,o,a){const s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t},perspective:function(t,e,n,r,i){const o=1/Math.tan(e/2);let a;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(r-i),t[10]=(i+r)*a,t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),l=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:function(t,e,n,r){let i,o,a,s,u,l,c,f,h,d,p,m,g,v,w,y,b,M,x,k,T,E,S,_,F=r[0],A=r[1],I=r[2],O=Math.sqrt(F*F+A*A+I*I);return O<$()?null:(O=1/O,F*=O,A*=O,I*=O,i=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],u=e[1],l=e[2],c=e[3],f=e[4],h=e[5],d=e[6],p=e[7],m=e[8],g=e[9],v=e[10],w=e[11],y=F*F*a+o,b=A*F*a+I*i,M=I*F*a-A*i,x=F*A*a-I*i,k=A*A*a+o,T=I*A*a+F*i,E=F*I*a+A*i,S=A*I*a-F*i,_=I*I*a+o,t[0]=s*y+f*b+m*M,t[1]=u*y+h*b+g*M,t[2]=l*y+d*b+v*M,t[3]=c*y+p*b+w*M,t[4]=s*x+f*k+m*T,t[5]=u*x+h*k+g*T,t[6]=l*x+d*k+v*T,t[7]=c*x+p*k+w*T,t[8]=s*E+f*S+m*_,t[9]=u*E+h*S+g*_,t[10]=l*E+d*S+v*_,t[11]=c*E+p*S+w*_,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+f*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=f*i-s*r,t[11]=h*i-u*r,t},rotateY:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-l*r,t[1]=a*i-c*r,t[2]=s*i-f*r,t[3]=u*i-h*r,t[8]=o*r+l*i,t[9]=a*r+c*i,t[10]=s*r+f*i,t[11]=u*r+h*i,t},rotateZ:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(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[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+f*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=f*i-s*r,t[7]=h*i-u*r,t},scale:function(t,e,n){const r=n[0],i=n[1],o=n[2];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]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:C,str:function(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]+")"},sub:B,subtract:B,targetTo:function(t,e,n,r){const i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],l=r[2];let c=i-n[0],f=o-n[1],h=a-n[2],d=c*c+f*f+h*h;d>0&&(d=1/Math.sqrt(d),c*=d,f*=d,h*=d);let p=u*h-l*f,m=l*c-s*h,g=s*f-u*c;return d=p*p+m*m+g*g,d>0&&(d=1/Math.sqrt(d),p*=d,m*=d,g*=d),t[0]=p,t[1]=m,t[2]=g,t[3]=0,t[4]=f*g-h*m,t[5]=h*p-c*g,t[6]=c*m-f*p,t[7]=0,t[8]=c,t[9]=f,t[10]=h,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:function(t,e,n){const r=n[0],i=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*o+e[12],t[13]=e[1]*r+e[5]*i+e[9]*o+e[13],t[14]=e[2]*r+e[6]*i+e[10]*o+e[14],t[15]=e[3]*r+e[7]*i+e[11]*o+e[15];else{const n=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=e[7],d=e[8],p=e[9],m=e[10],g=e[11];t[0]=n,t[1]=a,t[2]=s,t[3]=u,t[4]=l,t[5]=c,t[6]=f,t[7]=h,t[8]=d,t[9]=p,t[10]=m,t[11]=g,t[12]=n*r+l*i+d*o+e[12],t[13]=a*r+c*i+p*o+e[13],t[14]=s*r+f*i+m*o+e[14],t[15]=u*r+h*i+g*o+e[15]}return t},transpose:z},Symbol.toStringTag,{value:"Module"}));class Y{constructor(t,e,n){this.strength=t,this.radius=e,this.threshold=n,this.type="bloom"}interpolate(t,e,n){this.strength=Q(t.strength,e.strength,n),this.radius=Q(t.radius,e.radius,n),this.threshold=Q(t.threshold,e.threshold,n)}clone(){return new Y(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:tt(this.radius),strength:this.strength,threshold:this.threshold}}}class Z{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,n){this.radius=Math.round(Q(t.radius,e.radius,n))}clone(){return new Z(this.radius)}toJSON(){return{type:"blur",radius:tt(this.radius)}}}class X{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.amount=Q(t.amount,e.amount,n),this._updateMatrix()}clone(){return new X(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||k();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const n=C(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return z(n,n)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const n=C(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return z(n,n)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,n=C(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return z(n,n)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const n=1-2*e,r=C(t,n,0,0,e,0,n,0,e,0,0,n,e,0,0,0,1);return z(r,r)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const n=C(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 z(n,n)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,n=C(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return z(n,n)})(t)}}}class G{constructor(t,e,n,r){this.offsetX=t,this.offsetY=e,this.blurRadius=n,this.color=r,this.type="drop-shadow"}interpolate(t,e,n){this.offsetX=Q(t.offsetX,e.offsetX,n),this.offsetY=Q(t.offsetY,e.offsetY,n),this.blurRadius=Q(t.blurRadius,e.blurRadius,n),this.color[0]=Math.round(Q(t.color[0],e.color[0],n)),this.color[1]=Math.round(Q(t.color[1],e.color[1],n)),this.color[2]=Math.round(Q(t.color[2],e.color[2],n)),this.color[3]=Q(t.color[3],e.color[3],n)}clone(){return new G(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:tt(this.offsetX),yoffset:tt(this.offsetY),blurRadius:tt(this.blurRadius),color:t}}}class H{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.angle=Q(t.angle,e.angle,n),this._updateMatrix()}clone(){return new H(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||k();this._colorMatrix=((t,e)=>{const n=Math.sin(e*Math.PI/180),r=Math.cos(e*Math.PI/180),i=C(t,.213+.787*r-.213*n,.715-.715*r-.715*n,.072-.072*r+.928*n,0,.213-.213*r+.143*n,.715+.285*r+.14*n,.072-.072*r-.283*n,0,.213-.213*r-.787*n,.715-.715*r+.715*n,.072+.928*r+.072*n,0,0,0,0,1);return z(i,i)})(t,this.angle)}}class K{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,n){this.amount=Q(t.amount,e.amount,n)}clone(){return new K(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function Q(t,e,n){return t+(e-t)*n}function tt(t){return Math.round(1e3*((e=t)?72*e/96:0))/1e3;var e}function et(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new X(t.type,0);case"saturate":case"brightness":case"contrast":return new X(t.type,1);case"opacity":return new K(1);case"hue-rotate":return new H(0);case"blur":return new Z(0);case"drop-shadow":return new G(0,0,0,[...M("transparent")]);case"bloom":return new Y(0,0,1)}}function nt(t,e){const n=t.length>e.length?t:e;return(t.length>e.length?e:t).every(((t,e)=>t.type===n[e].type))}function rt(t,e){const n=t.length>e.length?t:e,r=t.length>e.length?e:t;for(let t=r.length;t<n.length;t++)r.push(et(n[t]))}var it,ot,at={exports:{}};ot=function(){function t(e,n,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,t.prototype),o.expected=n,o.found=r,o.location=i,o.name="SyntaxError",o}function e(t,e,n){return n=n||" ",t.length>e?t:t+(n+=n.repeat(e-=t.length)).slice(0,e)}return function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(t,Error),t.prototype.format=function(t){var n="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){i=t[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(i){var u=this.location.end,l=e("",a.line.toString().length," "),c=i[o.line-1],f=(o.line===u.line?u.column:c.length+1)-o.column||1;n+="\n --\x3e "+s+"\n"+l+" |\n"+a.line+" | "+c+"\n"+l+" | "+e("",o.column-1," ")+e("",f,"^")}else n+="\n at "+s}return n},t.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.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(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function o(t){return t.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(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+i(t)+'"':"end of input"}(e)+" found."},{SyntaxError:t,parse:function(e,n){var r,i={},o=(n=void 0!==n?n:{}).grammarSource,a={start:Lt},s=Lt,u="none",l=")",c=",",f="(",h="%",d="px",p="cm",m="mm",g="in",v="pt",w="pc",y="deg",b="rad",M="grad",x="turn",k="#",T=".",E="e",S=/^[ \t\n\r]/,_=/^[a-z\-]/,F=/^[0-9a-fA-F]/,A=/^[+\-]/,I=/^[0-9]/,O=zt("none"),j=Ct("none",!1),N=Ct(")",!1),P=Ct(",",!1),$=zt("whitespace"),R=Dt([" ","\t","\n","\r"],!1,!1),q=zt("function"),U=Ct("(",!1),C=zt("identifier"),D=Dt([["a","z"],"-"],!1,!1),z=zt("percentage"),W=Ct("%",!1),J=zt("length"),L=Ct("px",!1),V=Ct("cm",!1),B=Ct("mm",!1),Y=Ct("in",!1),Z=Ct("pt",!1),X=Ct("pc",!1),G=zt("angle"),H=Ct("deg",!1),K=Ct("rad",!1),Q=Ct("grad",!1),tt=Ct("turn",!1),et=zt("number"),nt=zt("color"),rt=Ct("#",!1),it=Dt([["0","9"],["a","f"],["A","F"]],!1,!1),ot=Dt(["+","-"],!1,!1),at=Dt([["0","9"]],!1,!1),st=Ct(".",!1),ut=Ct("e",!1),lt=function(){return[]},ct=function(t,e){return{type:"function",name:t,parameters:e||[]}},ft=function(t,e){return e.length>0?function(t,e){return[t].concat(function(t){return t.map((function(t){return t[3]}))}(e))}(t,e):[t]},ht=function(t){return{type:"quantity",value:t.value,unit:t.unit}},dt=function(t){return{type:"color",colorType:t.type,value:t.value}},pt=function(t){return t},mt=function(){return Ut()},gt=function(t){return{value:t,unit:"%"}},vt=function(t){return{value:t,unit:"px"}},wt=function(t){return{value:t,unit:"cm"}},yt=function(t){return{value:t,unit:"mm"}},bt=function(t){return{value:t,unit:"in"}},Mt=function(t){return{value:t,unit:"pt"}},xt=function(t){return{value:t,unit:"pc"}},kt=function(t){return{value:t,unit:"deg"}},Tt=function(t){return{value:t,unit:"rad"}},Et=function(t){return{value:t,unit:"grad"}},St=function(t){return{value:t,unit:"turn"}},_t=function(t){return{value:t,unit:null}},Ft=function(){return{type:"hex",value:Ut()}},At=function(t){return{type:"function",value:t}},It=function(){return{type:"named",value:Ut()}},Ot=function(){return parseFloat(Ut())},jt=0,Nt=0,Pt=[{line:1,column:1}],$t=0,Rt=[],qt=0;if("startRule"in n){if(!(n.startRule in a))throw new Error("Can't start parsing from rule \""+n.startRule+'".');s=a[n.startRule]}function Ut(){return e.substring(Nt,jt)}function Ct(t,e){return{type:"literal",text:t,ignoreCase:e}}function Dt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function zt(t){return{type:"other",description:t}}function Wt(t){var n,r=Pt[t];if(r)return r;for(n=t-1;!Pt[n];)n--;for(r={line:(r=Pt[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Pt[t]=r,r}function Jt(t){jt<$t||(jt>$t&&($t=jt,Rt=[]),Rt.push(t))}function Lt(){var t;return(t=Vt())===i&&(t=function(){var t,e;if(t=[],(e=Bt())!==i)for(;e!==i;)t.push(e),e=Bt();else t=i;return t}()),t}function Vt(){var t,n;return qt++,t=jt,Zt(),e.substr(jt,4)===u?(n=u,jt+=4):(n=i,0===qt&&Jt(j)),n!==i?(Zt(),Nt=t,t=lt()):(jt=t,t=i),qt--,t===i&&0===qt&&Jt(O),t}function Bt(){var t,n,r,o;return t=jt,Zt(),(n=function(){var t,n,r;return qt++,t=jt,(n=Xt())!==i?(40===e.charCodeAt(jt)?(r=f,jt++):(r=i,0===qt&&Jt(U)),r!==i?(Nt=t,t=pt(n)):(jt=t,t=i)):(jt=t,t=i),qt--,t===i&&(n=i,0===qt&&Jt(q)),t}())!==i?(Zt(),(r=function(){var t,n,r,o,a,s,u,l;if(t=jt,(n=Yt())!==i){for(r=[],o=jt,a=Zt(),44===e.charCodeAt(jt)?(s=c,jt++):(s=i,0===qt&&Jt(P)),s===i&&(s=null),u=Zt(),(l=Yt())!==i?o=a=[a,s,u,l]:(jt=o,o=i);o!==i;)r.push(o),o=jt,a=Zt(),44===e.charCodeAt(jt)?(s=c,jt++):(s=i,0===qt&&Jt(P)),s===i&&(s=null),u=Zt(),(l=Yt())!==i?o=a=[a,s,u,l]:(jt=o,o=i);Nt=t,t=ft(n,r)}else jt=t,t=i;return t}())===i&&(r=null),Zt(),41===e.charCodeAt(jt)?(o=l,jt++):(o=i,0===qt&&Jt(N)),o!==i?(Zt(),Nt=t,t=ct(n,r)):(jt=t,t=i)):(jt=t,t=i),t}function Yt(){var t,e;return t=jt,(e=Gt())===i&&(e=Ht())===i&&(e=Kt())===i&&(e=function(){var t,e;return qt++,t=jt,Zt(),(e=te())!==i?(Nt=t,t=_t(e)):(jt=t,t=i),qt--,t===i&&0===qt&&Jt(et),t}()),e!==i&&(Nt=t,e=ht(e)),(t=e)===i&&(t=jt,(e=Qt())!==i&&(Nt=t,e=dt(e)),t=e),t}function Zt(){var t,n;for(qt++,t=[],S.test(e.charAt(jt))?(n=e.charAt(jt),jt++):(n=i,0===qt&&Jt(R));n!==i;)t.push(n),S.test(e.charAt(jt))?(n=e.charAt(jt),jt++):(n=i,0===qt&&Jt(R));return qt--,n=i,0===qt&&Jt($),t}function Xt(){var t,n,r;if(qt++,t=jt,n=[],_.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(D)),r!==i)for(;r!==i;)n.push(r),_.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(D));else n=i;return n!==i&&(Nt=t,n=mt()),qt--,(t=n)===i&&(n=i,0===qt&&Jt(C)),t}function Gt(){var t,n,r;return qt++,t=jt,Zt(),(n=te())!==i?(37===e.charCodeAt(jt)?(r=h,jt++):(r=i,0===qt&&Jt(W)),r!==i?(Nt=t,t=gt(n)):(jt=t,t=i)):(jt=t,t=i),qt--,t===i&&0===qt&&Jt(z),t}function Ht(){var t,n,r;return qt++,t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===d?(r=d,jt+=2):(r=i,0===qt&&Jt(L)),r!==i?(Nt=t,t=vt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===p?(r=p,jt+=2):(r=i,0===qt&&Jt(V)),r!==i?(Nt=t,t=wt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===m?(r=m,jt+=2):(r=i,0===qt&&Jt(B)),r!==i?(Nt=t,t=yt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===g?(r=g,jt+=2):(r=i,0===qt&&Jt(Y)),r!==i?(Nt=t,t=bt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===v?(r=v,jt+=2):(r=i,0===qt&&Jt(Z)),r!==i?(Nt=t,t=Mt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===w?(r=w,jt+=2):(r=i,0===qt&&Jt(X)),r!==i?(Nt=t,t=xt(n)):(jt=t,t=i)):(jt=t,t=i)))))),qt--,t===i&&0===qt&&Jt(J),t}function Kt(){var t,n,r;return qt++,t=jt,(n=te())!==i?(e.substr(jt,3)===y?(r=y,jt+=3):(r=i,0===qt&&Jt(H)),r!==i?(Nt=t,t=kt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,(n=te())!==i?(e.substr(jt,3)===b?(r=b,jt+=3):(r=i,0===qt&&Jt(K)),r!==i?(Nt=t,t=Tt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,(n=te())!==i?(e.substr(jt,4)===M?(r=M,jt+=4):(r=i,0===qt&&Jt(Q)),r!==i?(Nt=t,t=Et(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,(n=te())!==i?(e.substr(jt,4)===x?(r=x,jt+=4):(r=i,0===qt&&Jt(tt)),r!==i?(Nt=t,t=St(n)):(jt=t,t=i)):(jt=t,t=i)))),qt--,t===i&&(n=i,0===qt&&Jt(G)),t}function Qt(){var t,n,r,o;if(qt++,t=jt,35===e.charCodeAt(jt)?(n=k,jt++):(n=i,0===qt&&Jt(rt)),n!==i){if(r=[],F.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(it)),o!==i)for(;o!==i;)r.push(o),F.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(it));else r=i;r!==i?(Nt=t,t=Ft()):(jt=t,t=i)}else jt=t,t=i;return t===i&&(t=jt,(n=Bt())!==i&&(Nt=t,n=At(n)),(t=n)===i&&(t=jt,(n=Xt())!==i&&(Nt=t,n=It()),t=n)),qt--,t===i&&(n=i,0===qt&&Jt(nt)),t}function te(){var t,n,r,o,a,s,u;for(t=jt,A.test(e.charAt(jt))?(e.charAt(jt),jt++):0===qt&&Jt(ot),n=jt,r=[],I.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(at));o!==i;)r.push(o),I.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(at));if(46===e.charCodeAt(jt)?(o=T,jt++):(o=i,0===qt&&Jt(st)),o!==i){if(a=[],I.test(e.charAt(jt))?(s=e.charAt(jt),jt++):(s=i,0===qt&&Jt(at)),s!==i)for(;s!==i;)a.push(s),I.test(e.charAt(jt))?(s=e.charAt(jt),jt++):(s=i,0===qt&&Jt(at));else a=i;a!==i?n=r=[r,o,a]:(jt=n,n=i)}else jt=n,n=i;if(n===i)if(n=[],I.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(at)),r!==i)for(;r!==i;)n.push(r),I.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(at));else n=i;if(n!==i){if(r=jt,101===e.charCodeAt(jt)?(o=E,jt++):(o=i,0===qt&&Jt(ut)),o!==i){if(A.test(e.charAt(jt))?(a=e.charAt(jt),jt++):(a=i,0===qt&&Jt(ot)),a===i&&(a=null),s=[],I.test(e.charAt(jt))?(u=e.charAt(jt),jt++):(u=i,0===qt&&Jt(at)),u!==i)for(;u!==i;)s.push(u),I.test(e.charAt(jt))?(u=e.charAt(jt),jt++):(u=i,0===qt&&Jt(at));else s=i;s!==i?r=o=[o,a,s]:(jt=r,r=i)}else jt=r,r=i;r===i&&(r=null),Nt=t,t=Ot()}else jt=t,t=i;return t}if((r=s())!==i&&jt===e.length)return r;throw r!==i&&jt<e.length&&Jt({type:"end"}),function(e,n,r){return new t(t.buildMessage(e,n),e,n,r)}(Rt,$t<e.length?e.charAt($t):null,function(t,e){var n=Wt(t),r=Wt(e);return{source:o,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}($t,$t<e.length?$t+1:$t))}}},(it=at).exports&&(it.exports=ot());var st=at.exports;function ut(t){if(!t||0===t.length)return null;if("string"==typeof t){const e=lt(t);return e&&0!==e.length?e:null}const e=t.map((t=>{if(!Number.isFinite(t.scale)||t.scale<=0)throw new y("effect:invalid-scale","scale must be finite and greater than 0",{stop:t});return{scale:t.scale,effects:lt(t.value)}}));e.sort(((t,e)=>e.effects.length-t.effects.length));for(let t=0;t<e.length-1;t++){if(!nt(e[t].effects,e[t+1].effects))throw new y("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:e[t].effects,b:e[t+1].effects});rt(e[t].effects,e[t+1].effects)}return e.sort(((t,e)=>e.scale-t.scale)),e}function lt(t){let e;if(!t)return[];try{e=st.parse(t)}catch(e){throw new y("effect:invalid-syntax","Invalid effect syntax",{value:t,error:e})}return e.map((t=>function(t){try{switch(t.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(t){let e=1;return ct(t.parameters,1),1===t.parameters.length&&(e=mt(t.parameters[0])),new X(t.name,e)}(t);case"opacity":return function(t){let e=1;return ct(t.parameters,1),1===t.parameters.length&&(e=mt(t.parameters[0])),new K(e)}(t);case"hue-rotate":return function(t){let e=0;return ct(t.parameters,1),1===t.parameters.length&&(e=function(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=dt[t.unit]))throw new y("effect:type-error",`Expected <angle>, Actual: ${ft(t)}`,{term:t})}(t),t.value*dt[t.unit]||0}(t.parameters[0])),new H(e)}(t);case"blur":return function(t){let e=0;return ct(t.parameters,1),1===t.parameters.length&&(e=gt(t.parameters[0]),ht(e,t.parameters[0])),new Z(e)}(t);case"drop-shadow":return function(t){const e=[];let n=null;for(const r of t.parameters)if("color"===r.type){if(e.length&&Object.freeze(e),n)throw new y("effect:type-error","Accepts only one color",{});n=vt(r)}else{const t=gt(r);if(Object.isFrozen(e))throw new y("effect:type-error","<length> parameters not consecutive",{lengths:e});e.push(t),3===e.length&&ht(t,r)}if(e.length<2||e.length>3)throw new y("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${e.length}}`,{lengths:e});return new G(e[0],e[1],e[2]||0,n||wt("black"))}(t);case"bloom":return function(t){let e=1,n=0,r=0;return ct(t.parameters,3),t.parameters[0]&&(e=mt(t.parameters[0])),t.parameters[1]&&(n=gt(t.parameters[1]),ht(n,t.parameters[1])),t.parameters[2]&&(r=mt(t.parameters[2])),new Y(e,n,r)}(t)}}catch(e){throw e.details.filter=t,e}throw new y("effect:unknown-effect",`Effect '${t.name}' is not supported`,{effect:t})}(t)))}function ct(t,e){if(t.length>e)throw new y("effect:type-error",`Function supports up to ${e} parameters, Actual: ${t.length}`,{parameters:t})}function ft(t){if("color"===t.type)return"<color>";if(t.unit){if(t.unit in pt)return"<length>";if(t.unit in dt)return"<angle>";if("%"===t.unit)return"<percentage>"}return"<double>"}function ht(t,e){if(t<0)throw new y("effect:type-error",`Negative values are not allowed, Actual: ${t}`,{term:e})}const dt={deg:1,grad:.9,rad:180/Math.PI,turn:360},pt={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function mt(t){!function(t){if("quantity"!==t.type||null!==t.unit&&"%"!==t.unit)throw new y("effect:type-error",`Expected <double> or <percentage>, Actual: ${ft(t)}`,{term:t})}(t);const e=t.value;return ht(e,t),"%"===t.unit?.01*e:e}function gt(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=pt[t.unit]))throw new y("effect:type-error",`Expected <length>, Actual: ${ft(t)}`,{term:t})}(t),t.value*pt[t.unit]||0}function vt(t){switch(t.colorType){case"hex":return function(t){const e=t.length>5,n=e?8:4,r=(1<<n)-1,i=e?1:17,o=e?9===t.length:5===t.length;let a=Number("0x"+t.substr(1));if(isNaN(a))return null;const s=[0,0,0,1];let u;return o&&(u=a&r,a>>=n,s[3]=i*u/255),u=a&r,a>>=n,s[2]=i*u,u=a&r,a>>=n,s[1]=i*u,u=a&r,a>>=n,s[0]=i*u,s}(t.value);case"named":return wt(t.value);case"function":return function(t){if(ct(t.parameters,4),yt.test(t.name))return[mt(t.parameters[0]),mt(t.parameters[1]),mt(t.parameters[2]),t.parameters[3]?mt(t.parameters[3]):1];if(bt.test(t.name))return function(t,e,n,r=1){const i=(t%360+360)%360/360,o=n<=.5?n*(e+1):n+e-n*e,a=2*n-o;return[Math.round(255*x(a,o,i+1/3)),Math.round(255*x(a,o,i)),Math.round(255*x(a,o,i-1/3)),r]}(function(t){return function(t){if("quantity"!==t.type||null!==t.unit)throw new y("effect:type-error",`Expected <double>, Actual: ${ft(t)}`,{term:t})}(t),ht(t.value,t),t.value}(t.parameters[0]),mt(t.parameters[1]),mt(t.parameters[2]),t.parameters[3]?mt(t.parameters[3]):1);throw new y("effect:syntax-error",`Invalid color function '${t.name}'`,{colorFunction:t})}(t.value)}}function wt(t){if(!function(t){return!!b[t]||!!b[t.toLowerCase()]}(t))throw new y("effect:unknown-color",`color '${t}' isn't valid`,{namedColor:t});return function(t){return[...M(t)]}(t)}const yt=/^rgba?/i,bt=/^hsla?/i;function Mt(t){const e=ut(t);return e?function(t){const e=t[0];return!!e&&"type"in e}(e)?e.map((t=>t.toJSON())):e.map((({scale:t,effects:e})=>({scale:t,value:e.map((t=>t.toJSON()))}))):null}function xt(t){if(!t||0===t.length)return null;if(function(t){const e=t[0];return!!e&&"scale"in e}(t)){const e=[];for(const n of t)e.push({scale:n.scale,value:kt(n.value)});return e}return kt(t)}function kt(t){if(!t?.length)return"";const e=[];for(const n of t){let t=[];switch(n.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":t=[Tt(n,"amount")];break;case"blur":t=[Tt(n,"radius","pt")];break;case"hue-rotate":t=[Tt(n,"angle","deg")];break;case"drop-shadow":t=[Tt(n,"xoffset","pt"),Tt(n,"yoffset","pt"),Tt(n,"blurRadius","pt"),Et(n,"color")];break;case"bloom":t=[Tt(n,"strength"),Tt(n,"radius","pt"),Tt(n,"threshold")]}const r=`${n.type}(${t.filter(Boolean).join(" ")})`;ut(r),e.push(r)}return e.join(" ")}function Tt(t,e,n){if(null==t[e])throw new y("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});return n?t[e]+n:""+t[e]}function Et(t,e){if(null==t[e])throw new y("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});const n=t[e];return`rgba(${n[0]||0}, ${n[1]||0}, ${n[2]||0}, ${n[3]/255||0})`}function St(t,e,n){const r=e?.layer;if(!t)return r?.effect?r.effect:r?.featureEffect?"includedEffect"===n?r.featureEffect.includedEffect:r.featureEffect.excludedEffect:null;const i=Mt(t);let o=null;o=r.featureEffect?"includedEffect"===n?r.featureEffect.includedEffect:r.featureEffect.excludedEffect:r.effect;const a=o?Mt(o):null;if(!a)return xt(i);let s=[...a];return i&&i.forEach((t=>{s.forEach((e=>{const{value:n}=e;if(n)n.forEach(((r,o)=>{r.type===t.type?n[o]=t:!e.value.find((t=>t.type===i[0].type))&&(e.value=[...e.value,...i])}));else{const n=!s.find((t=>t.type===e.type));!s.find((e=>e.type===t.type))&&(s=[...s,t]),n&&(s=[...s,e])}}))})),xt(s)}const _t="time-slider-watch",Ft=new class{constructor(){this.initializeModules()}async initializeModules(){try{const[t,e,n,r,i,o,s]=await a(["esri/core/Handles","esri/core/reactiveUtils","esri/widgets/TimeSlider","esri/TimeExtent","esri/TimeInterval","esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]);this.reactiveUtils=e,this.handles=new t,this.TimeSlider=n,this.TimeExtent=r,this.TimeInterval=i,this.FeatureFilter=o,this.FeatureEffect=s}catch(t){}}async init(t){t&&(t.innerHTML="");const{view:e,timeInfoConfigItems:n}=u;if(e)try{await e.when();const r=await this.getTimeLayerViews(e,n);return u.timeInfoItems=this.generateTimeInfoItems(r,n),this.initTimeSlider(t),this.setupFilterModeWatcher(),Promise.resolve()}catch(t){}}destroy(){var t,e;null===(t=this.handles)||void 0===t||t.removeAll(),this.handles=null,null===(e=u.timeSlider)||void 0===e||e.destroy()}async getTimeLayerViews(t,e){const{allLayers:n}=t.map,r=e.map((({id:t})=>{return e=t,n.find((({id:t})=>e===t));var e})).map((e=>t.whenLayerView(e)));return await Promise.all(r)}generateTimeInfoItems(t,e){return[...e].map((e=>{const n=t.find((({layer:t})=>t.id===e.id));return this.generateTimeInfoItem(n,e)}))}generateTimeInfoItem(t,{increments:e,rangeStart:n,rangeEnd:r}){var i;const o=null==t?void 0:t.layer,a=null===(i=null==o?void 0:o.timeInfo)||void 0===i?void 0:i.fullTimeExtent;return{layerView:t,unit:e,rangeStart:new Date(n),rangeEnd:new Date(r),timeExtent:a,previousTimeExtent:null}}initTimeSlider(t){var e,n;const r=null===(e=null==u?void 0:u.timeInfoItems)||void 0===e?void 0:e[0];if(!r)return;const{TimeSlider:i}=this;u.selectedTimeInfoItem=r;const o=this.getTimeSliderConfig(t);u.timeSlider=new i(o),"2d"===(null===(n=u.view)||void 0===n?void 0:n.type)&&this.initialize2DView()}setupFilterModeWatcher(){l("filterMode",(t=>u.timeInfoItems.forEach((e=>{var n,r,i;const o=e.layerView;this.applyTimeExtent(o,(null===(r=null===(n=null==o?void 0:o.featureEffect)||void 0===n?void 0:n.filter)||void 0===r?void 0:r.timeExtent)||(null===(i=o.filter)||void 0===i?void 0:i.timeExtent),t)}))))}getTimeSliderConfig(t){var e;const[{timeExtent:n,rangeStart:r,rangeEnd:i,unit:o}]=u.timeInfoItems,{TimeExtent:a,TimeInterval:s}=this;return{container:t,fullTimeExtent:n,timeExtent:new a({start:r,end:i}),mode:"time-window",loop:!0,stops:{interval:new s({unit:o,value:1})},view:"3d"===(null===(e=u.view)||void 0===e?void 0:e.type)?u.view:null}}initialize2DView(){u.timeInfoItems.forEach((t=>this.applyTimeExtent(t.layerView,new this.TimeExtent({start:t.rangeStart,end:t.rangeEnd})))),this.setupTimeExtentWatcher()}applyTimeExtent(t,e,n){var r;"effect"===(null===(r=u.filterMode)||void 0===r?void 0:r.type)?this.applyFeatureEffect(t,e,n):this.applyFeatureFilter(t,e)}applyFeatureEffect(t,e,n){t&&(t.filter&&t.set("filter",null),t.featureEffect&&!n?t.featureEffect.filter.timeExtent=e:this.handleUpdatedFeatureEffect(t,e))}handleUpdatedFeatureEffect(t,e){var n,r,i,o;const{FeatureEffect:a}=this;t.featureEffect=new a({filter:{timeExtent:e},includedEffect:St(null===(r=null===(n=u.filterMode)||void 0===n?void 0:n.effect)||void 0===r?void 0:r.includedEffect,t,"includedEffect"),excludedEffect:St(null===(o=null===(i=u.filterMode)||void 0===i?void 0:i.effect)||void 0===o?void 0:o.excludedEffect,t,"excludedEffect")})}applyFeatureFilter(t,e){t.featureEffect&&t.set("featureEffect",null),t.filter?t.filter.timeExtent=e:t.filter=new this.FeatureFilter({timeExtent:e})}setupTimeExtentWatcher(){var t,e,n,r;(null===(t=this.handles)||void 0===t?void 0:t.has(_t))&&(null===(e=this.handles)||void 0===e||e.remove(_t)),null===(n=this.handles)||void 0===n||n.add(null===(r=null==u?void 0:u.timeSlider)||void 0===r?void 0:r.watch("timeExtent",(t=>{var e;return this.applyTimeExtent(null===(e=u.selectedTimeInfoItem)||void 0===e?void 0:e.layerView,t)})),_t)}updateSelectedTimeInfoItem(t){u.timeSlider&&(u.selectedTimeInfoItem&&(u.selectedTimeInfoItem.previousTimeExtent=u.timeSlider.timeExtent),u.selectedTimeInfoItem=t,this.reconfigureTimeSlider(t),this.applyTimeExtent(t.layerView,u.timeSlider.timeExtent),this.setupTimeExtentWatcher())}reconfigureTimeSlider(t){u.timeSlider&&(u.timeSlider.fullTimeExtent=t.timeExtent,u.timeSlider.timeExtent=this.getTimeExtent(t),u.timeSlider.stops={interval:this.getTimeInterval(t)})}getTimeExtent({rangeStart:t,rangeEnd:e,previousTimeExtent:n}){const{TimeExtent:r}=this;return null!=n?n:new r({start:t,end:e})}getTimeInterval(t){var e,n,r,i,o;const{TimeInterval:a}=this;return new a({unit:null!==(e=t.unit)&&void 0!==e?e:null===(o=null===(i=null===(r=null===(n=t.layerView)||void 0===n?void 0:n.layer)||void 0===r?void 0:r.timeInfo)||void 0===i?void 0:i.interval)||void 0===o?void 0:o.unit,value:1})}getLabel(t){var e,n;return(null===(n=null===(e=null==t?void 0:t.layerView)||void 0===e?void 0:e.layer)||void 0===n?void 0:n.title)||""}},At=class{constructor(e){t(this,e),this.timeSliderRef=void 0,this.timeInfoConfigItems=[],this.filterMode=void 0,this.view=void 0}async updateTimeInfoConfigItems(){u.timeInfoConfigItems=this.timeInfoConfigItems,await Ft.init(this.timeSliderRef)}async updateFilterMode(){u.filterMode=this.filterMode}async componentWillLoad(){try{u.view=this.view,u.timeInfoConfigItems=this.timeInfoConfigItems,this.filterMode&&(u.filterMode=this.filterMode),await s(this)}catch(t){}}async componentDidLoad(){try{await Ft.init(this.timeSliderRef)}catch(t){}finally{u.loading=!1}}disconnectedcallback(){Ft.destroy()}render(){return e(n,{key:"bf0887f83b19239ce1b81efad5c356c7edc05ba1"},this._renderBase())}_renderBase(){return e("div",{class:"instant-apps-time-filter"+("2d"!==this.view.type?" instant-apps-time-filter--3d":"")},this._renderLoader(),this._renderMain())}_renderMain(){return e(r,null,"2d"===this.view.type&&this._renderTopEl(),e("div",{ref:t=>this.timeSliderRef=t}))}_renderLoader(){var t,n;return u.loading&&e(r,null,e("div",{class:"instant-apps-time-filter__background"}),e("div",{class:"instant-apps-time-filter__loading-container"},e("calcite-loader",{scale:"m",label:null===(t=this.messages)||void 0===t?void 0:t.loading,text:null===(n=this.messages)||void 0===n?void 0:n.loading})))}_renderTopEl(){return this.timeInfoConfigItems.length>1?this._renderDropdown():this._renderLayerTitle()}_renderLayerTitle(){var t,n,r;const i=null===(r=null===(n=null===(t=u.selectedTimeInfoItem)||void 0===t?void 0:t.layerView)||void 0===n?void 0:n.layer)||void 0===r?void 0:r.title;return e("span",{class:"instant-apps-time-filter__layer-title"},i)}_renderDropdown(){return u.selectedTimeInfoItem&&e("calcite-dropdown",null,this._renderDropdownButton(),this._renderDropdownItems())}_renderDropdownButton(){return e("calcite-button",{slot:"trigger",appearance:"transparent",iconEnd:"chevron-down",width:"full",alignment:"space-between"},Ft.getLabel(u.selectedTimeInfoItem))}_renderDropdownItems(){return u.timeInfoItems.map((t=>this._renderDropdownItem(t)))}_renderDropdownItem(t){var n,r,i,o,a;const s=null===(i=null===(r=null===(n=u.selectedTimeInfoItem)||void 0===n?void 0:n.layerView)||void 0===r?void 0:r.layer)||void 0===i?void 0:i.id,l=null===(a=null===(o=null==t?void 0:t.layerView)||void 0===o?void 0:o.layer)||void 0===a?void 0:a.id;return e("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>Ft.updateSelectedTimeInfoItem(t),selected:s===l},Ft.getLabel(t))}get el(){return i(this)}static get watchers(){return{timeInfoConfigItems:["updateTimeInfoConfigItems"],filterMode:["updateFilterMode"]}}};At.style=".instant-apps-time-filter{position:relative;display:block;min-width:375px;min-height:200px}.instant-apps-time-filter__background{background-color:var(--calcite-ui-background);position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}.instant-apps-time-filter calcite-dropdown{width:100%}.instant-apps-time-filter calcite-dropdown calcite-button{--calcite-color-brand:var(--calcite-ui-text-1);--calcite-ui-brand:var(--calcite-ui-text-1)}.instant-apps-time-filter__layer-title{font-weight:550;display:inline-block;padding:10px}.instant-apps-time-filter__loading-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.instant-apps-time-filter--3d{min-height:160px}";export{At as instant_apps_time_filter}
|
6
|
+
import{r as t,h as e,H as n,F as r,g as i}from"./p-f4c4a2b7.js";import{c as o}from"./p-dcc35070.js";import{l as a}from"./p-4cd4cb85.js";import{g as s}from"./p-7bfecd07.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-ac122d9e.js";const{state:u,onChange:l}=o({timeInfoConfigItems:[],filterMode:{type:"filter"},view:null,timeSlider:null,timeInfoItems:[],selectedTimeInfoItem:null,loading:!0});let c;function f(t){return"function"==typeof c[t]?c[t]=c[t](globalThis):c[t]}function h(t){if(!t||"object"!=typeof t||"function"==typeof t)return t;const e=function(t){if(function(t){return"Int8Array"===t?.constructor?.name}(t)||function(t){return"Uint8Array"===t?.constructor?.name}(t)||function(t){return"Uint8ClampedArray"===t?.constructor?.name}(t)||function(t){return"Int16Array"===t?.constructor?.name}(t)||function(t){return"Uint16Array"===t?.constructor?.name}(t)||function(t){return"Int32Array"===t?.constructor?.name}(t)||function(t){return"Uint32Array"===t?.constructor?.name}(t)||function(t){return"Float32Array"===t?.constructor?.name}(t)||function(t){return"Float64Array"===t?.constructor?.name}(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[n,r]of t)e.set(n,h(r));return e}if(t instanceof Set){const e=new Set;for(const n of t)e.add(h(n));return e}return null}(t);if(null!=e)return e;if(function(t){return"function"==typeof t.clone}(t))return t.clone();if(function(t){return"function"==typeof t.map&&"function"==typeof t.forEach}(t))return t.map(h);if(function(t){return"function"==typeof t.notifyChange&&"function"==typeof t.watch}(t))return t.clone();const n={};for(const e of Object.getOwnPropertyNames(t))n[e]=h(t[e]);return n}function d(t,e,n){return e?Object.keys(e).reduce(((t,r)=>{let i=t[r],o=e[r];return i===o?t:void 0===i?(t[r]=h(o),t):(Array.isArray(o)||Array.isArray(t)?(i=t[r]=i?Array.isArray(i)?i.concat():[i]:[],o&&(Array.isArray(o)||(o=[o]),n?o.forEach((t=>{i.includes(t)||i.push(t)})):t[r]=o.concat())):o&&"object"==typeof o?t[r]=d(i,o,n):t.hasOwnProperty(r)&&!e.hasOwnProperty(r)||(t[r]=o),t)}),t||{}):t}c=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},f.add=(t,e,n,r)=>((r||void 0===c[t])&&(c[t]=e),n&&f(t)),f.cache=c,f.add("big-integer-warning-enabled",!0),f.add("esri-deprecation-warnings",!0),f.add("esri-tests-disable-screenshots",!1),f.add("esri-tests-use-full-window",!1),f.add("esri-tests-post-to-influx",!0),(()=>{f.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(f.add("host-browser",t),f.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),f.add("dom",t),f("host-browser")){const t=navigator,e=t.userAgent,n=t.appVersion,r=parseFloat(n);if(f.add("wp",parseFloat(e.split("Windows Phone")[1])||void 0),f.add("msapp",parseFloat(e.split("MSAppHost/")[1])||void 0),f.add("khtml",n.includes("Konqueror")?r:void 0),f.add("edge",parseFloat(e.split("Edge/")[1])||void 0),f.add("opr",parseFloat(e.split("OPR/")[1])||void 0),f.add("webkit",!f("wp")&&!f("edge")&&parseFloat(e.split("WebKit/")[1])||void 0),f.add("chrome",!f("edge")&&!f("opr")&&parseFloat(e.split("Chrome/")[1])||void 0),f.add("android",!f("wp")&&parseFloat(e.split("Android ")[1])||void 0),f.add("safari",!n.includes("Safari")||f("wp")||f("chrome")||f("android")||f("edge")||f("opr")?void 0:parseFloat(n.split("Version/")[1])),f.add("mac",n.includes("Macintosh")),!f("wp")&&/(iPhone|iPod|iPad)/.test(e)){const t=RegExp.$1.replace(/P/,"p"),n=/OS ([\d_]+)/.test(e)?RegExp.$1:"1",r=parseFloat(n.replace(/_/,".").replaceAll("_",""));f.add(t,r),f.add("ios",r)}f("webkit")||(!e.includes("Gecko")||f("wp")||f("khtml")||f("edge")||f.add("mozilla",r),f("mozilla")&&f.add("ff",parseFloat(e.split("Firefox/")[1]||e.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),n=/iPhone/i.test(t);e&&f.add("esri-mobile",e),n&&f.add("esri-iPhone",n),f.add("esri-geolocation",!!navigator.geolocation)}f.add("esri-wasm","WebAssembly"in globalThis),f.add("esri-performance-mode-frames-between-render",20),f.add("esri-force-performance-mode",!1),f.add("esri-shared-array-buffer",(()=>{const t="SharedArrayBuffer"in globalThis,e=!1===globalThis.crossOriginIsolated;return t&&!e})),f.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([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])))),f.add("esri-atomics","Atomics"in globalThis),f.add("esri-workers","Worker"in globalThis),f.add("web-feat:cache","caches"in globalThis),f.add("esri-workers-arraybuffer-transfer",!f("safari")||Number(f("safari"))>=12),f.add("workers-pool-size",8),f.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),f.add("featurelayer-simplify-payload-size-factors",[1,1,4]),f.add("featurelayer-fast-triangulation-enabled",!0),f.add("featurelayer-animation-enabled",!0),f.add("featurelayer-snapshot-enabled",!0),f.add("featurelayer-snapshot-point-min-threshold",8e4),f.add("featurelayer-snapshot-point-max-threshold",4e5),f.add("featurelayer-snapshot-point-coverage",.1),f.add("featurelayer-query-max-depth",4),f.add("featurelayer-query-pausing-enabled",!1),f.add("featurelayer-advanced-symbols",!1),f.add("featurelayer-pbf",!0),f.add("featurelayer-pbf-statistics",!1),f.add("feature-layers-workers",!0),f.add("feature-polyline-generalization-factor",1),f.add("mapview-transitions-duration",200),f.add("mapview-essential-goto-duration",200),f.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),f.add("mapserver-pbf-version-support",10.81),f.add("mapservice-popup-identify-max-tolerance",20),f("host-webworker")||f("host-browser")&&(f.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),f.add("esri-image-decode",(()=>{if("decode"in new Image){const t=new Image;return t.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void t.decode().then((()=>{f.add("esri-image-decode",!0,!0,!0)})).catch((()=>{f.add("esri-image-decode",!1,!0,!0)}))}return!1})),f.add("esri-url-encodes-apostrophe",(()=>{const t=window.document.createElement("a");return t.href="?'",t.href.includes("?%27")})))})();const p={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.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}};globalThis.esriConfig&&(function(t,e,n=!1){d(p,e,n)}(0,globalThis.esriConfig,!0),delete p.has),p.assetsPath||(p.assetsPath="https://js.arcgis.com/4.30/@arcgis/core/assets",p.defaultAssetsPath=p.assetsPath);const m={info:0,warn:1,error:2,none:3};class g{constructor(t){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=t.level&&(this.level=t.level),null!=t.writer&&(this.writer=t.writer),this._module=t.module,g._loggers.set(this.module,this);const e=this.module.lastIndexOf(".");-1!==e&&(this._parent=g.getLogger(this.module.slice(0,e)))}get module(){return this._module}get parent(){return this._parent}error(...t){this._log("error","always",...t)}warn(...t){this._log("warn","always",...t)}info(...t){this._log("info","always",...t)}errorOnce(...t){this._log("error","once",...t)}warnOnce(...t){this._log("warn","once",...t)}infoOnce(...t){this._log("info","once",...t)}errorOncePerTick(...t){this._log("error","oncePerTick",...t)}warnOncePerTick(...t){this._log("warn","oncePerTick",...t)}infoOncePerTick(...t){this._log("info","oncePerTick",...t)}get test(){}static get test(){}static getLogger(t){return g._loggers.get(t="string"!=typeof t?t.declaredClass:t)||new g({module:t})}_log(t,e,...n){if(this._matchLevel(t)){if("always"!==e&&!g._throttlingDisabled){const r=function(...t){return function(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}(JSON.stringify(t,((t,e)=>"object"!=typeof e||Array.isArray(e)?e:"[Object]")))}(n),i=this._loggedMessages[t].get(r);if("once"===e&&null!=i||"oncePerTick"===e&&i&&i>=g._tickCounter)return;this._loggedMessages[t].set(r,g._tickCounter),g._scheduleTickCounterIncrement()}for(const e of p.log.interceptors)if(e(t,this.module,...n))return;this._inheritedWriter()(t,this.module,...n)}}_parentWithMember(t,e){let n=this;for(;null!=n;){const e=n[t];if(null!=e)return e;n=n.parent}return e}_inheritedWriter(){return this._parentWithMember("writer",v)}_matchLevel(t){return m[this._parentWithMember("level",p.log.level||"warn")]<=m[t]}static _scheduleTickCounterIncrement(){g._tickCounterScheduled||(g._tickCounterScheduled=!0,Promise.resolve().then((()=>{g._tickCounter++,g._tickCounterScheduled=!1})))}}function v(t,e,...n){console[t](`[${e}]`,...n)}g._loggers=new Map,g._tickCounter=0,g._tickCounterScheduled=!1,g._throttlingDisabled=!1;class w{constructor(t,e,n){this.name=t,this.details=n,this.message=(e&&function(t,e){return t.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,((t,n)=>{if(""===n)return"$";const r=function(t,e){if(null!=e)return e[t]||function(t,e,n){let r=n;for(const e of t){if(null==r)return;if(!(e in r))return void 0;r=r[e]}return r}(t.split("."),0,e)}(n,e);return(r??"").toString()}))}(e,n))??""}toString(){return"["+this.name+"]: "+this.message}}class y extends w{constructor(t,e,n){super(t,e,n)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((t,e)=>{if(e&&"object"==typeof e&&"function"==typeof e.toJSON)return e;try{return h(e)}catch(t){return"[object]"}})))}}catch(t){throw g.getLogger("esri.core.Error").error(t),t}return{name:this.name,message:this.message,details:this.details}}static fromJSON(t){return new y(t.name,t.message,t.details)}}y.prototype.type="error";const b={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 M(t){return b[t]??b[t.toLowerCase()]}function x(t,e,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?t+(e-t)*r:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function k(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const T=k();function E(t,e,n){return[t,e,n]}function S(){return E(1,1,1)}function _(){return E(1,0,0)}function F(){return E(0,1,0)}function A(){return E(0,0,1)}Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:T,clone:function(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},create:k,createView:function(t,e){return new Float32Array(t,e,16)},fromValues:function(t,e,n,r,i,o,a,s,u,l,c,f,h,d,p,m){const g=new Float32Array(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=u,g[9]=l,g[10]=c,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=m,g}},Symbol.toStringTag,{value:"Module"}));const I=S(),O=_(),j=F(),N=A();Object.freeze(Object.defineProperty({__proto__:null,ONES:I,UNIT_X:O,UNIT_Y:j,UNIT_Z:N,ZEROS:[0,0,0],clone:function(t){return[t[0],t[1],t[2]]},create:function(){return[0,0,0]},createView:function(t,e){return new Float64Array(t,e,3)},fromArray:function(t,e=[0,0,0]){const n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:E,ones:S,unitX:_,unitY:F,unitZ:A,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}));let P=1e-6;function $(){return P}const R=Math.random,q=Math.PI/180,U=180/Math.PI;function C(t,e,n,r,i,o,a,s,u,l,c,f,h,d,p,m,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=l,t[9]=c,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=m,t[15]=g,t}function D(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 z(t,e){if(t===e){const n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}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 W(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],w=n*s-r*a,y=n*u-i*a,b=n*l-o*a,M=r*u-i*s,x=r*l-o*s,k=i*l-o*u,T=c*m-f*p,E=c*g-h*p,S=c*v-d*p,_=f*g-h*m,F=f*v-d*m,A=h*v-d*g;let I=w*A-y*F+b*_+M*S-x*E+k*T;return I?(I=1/I,t[0]=(s*A-u*F+l*_)*I,t[1]=(i*F-r*A-o*_)*I,t[2]=(m*k-g*x+v*M)*I,t[3]=(h*x-f*k-d*M)*I,t[4]=(u*S-a*A-l*E)*I,t[5]=(n*A-i*S+o*E)*I,t[6]=(g*b-p*k-v*y)*I,t[7]=(c*k-h*b+d*y)*I,t[8]=(a*F-s*S+l*T)*I,t[9]=(r*S-n*F-o*T)*I,t[10]=(p*x-m*b+v*w)*I,t[11]=(f*b-c*x-d*w)*I,t[12]=(s*E-a*_-u*T)*I,t[13]=(n*_-r*E+i*T)*I,t[14]=(m*y-p*M-g*w)*I,t[15]=(c*M-f*y+h*w)*I,t):null}function J(t,e,n){const r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],w=e[15];let y=n[0],b=n[1],M=n[2],x=n[3];return t[0]=y*r+b*s+M*f+x*m,t[1]=y*i+b*u+M*h+x*g,t[2]=y*o+b*l+M*d+x*v,t[3]=y*a+b*c+M*p+x*w,y=n[4],b=n[5],M=n[6],x=n[7],t[4]=y*r+b*s+M*f+x*m,t[5]=y*i+b*u+M*h+x*g,t[6]=y*o+b*l+M*d+x*v,t[7]=y*a+b*c+M*p+x*w,y=n[8],b=n[9],M=n[10],x=n[11],t[8]=y*r+b*s+M*f+x*m,t[9]=y*i+b*u+M*h+x*g,t[10]=y*o+b*l+M*d+x*v,t[11]=y*a+b*c+M*p+x*w,y=n[12],b=n[13],M=n[14],x=n[15],t[12]=y*r+b*s+M*f+x*m,t[13]=y*i+b*u+M*h+x*g,t[14]=y*o+b*l+M*d+x*v,t[15]=y*a+b*c+M*p+x*w,t}function L(t,e,n){const r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,l=o+o,c=r*s,f=r*u,h=r*l,d=i*u,p=i*l,m=o*l,g=a*s,v=a*u,w=a*l;return t[0]=1-(d+m),t[1]=f+w,t[2]=h-v,t[3]=0,t[4]=f-w,t[5]=1-(c+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:R,equals:function(t,e){return Math.abs(t-e)<=P*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:$,setEpsilon:function(t){P=t},toDegree:function(t){return t*U},toRadian:function(t){return t*q}},Symbol.toStringTag,{value:"Module"}));const V=[0,0,0];function B(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-d*g)-f*(u*v-l*g)+m*(u*d-l*h),t[1]=-(r*(h*v-d*g)-f*(i*v-o*g)+m*(i*d-o*h)),t[2]=r*(u*v-l*g)-s*(i*v-o*g)+m*(i*l-o*u),t[3]=-(r*(u*d-l*h)-s*(i*d-o*h)+f*(i*l-o*u)),t[4]=-(a*(h*v-d*g)-c*(u*v-l*g)+p*(u*d-l*h)),t[5]=n*(h*v-d*g)-c*(i*v-o*g)+p*(i*d-o*h),t[6]=-(n*(u*v-l*g)-a*(i*v-o*g)+p*(i*l-o*u)),t[7]=n*(u*d-l*h)-a*(i*d-o*h)+c*(i*l-o*u),t[8]=a*(f*v-d*m)-c*(s*v-l*m)+p*(s*d-l*f),t[9]=-(n*(f*v-d*m)-c*(r*v-o*m)+p*(r*d-o*f)),t[10]=n*(s*v-l*m)-a*(r*v-o*m)+p*(r*l-o*s),t[11]=-(n*(s*d-l*f)-a*(r*d-o*f)+c*(r*l-o*s)),t[12]=-(a*(f*g-h*m)-c*(s*g-u*m)+p*(s*h-u*f)),t[13]=n*(f*g-h*m)-c*(r*g-i*m)+p*(r*h-i*f),t[14]=-(n*(s*g-u*m)-a*(r*g-i*m)+p*(r*u-i*s)),t[15]=n*(s*h-u*f)-a*(r*h-i*f)+c*(r*u-i*s),t},copy:function(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},determinant:function(t){const e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],f=t[10],h=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*o)*(f*g-h*m)-(e*s-r*o)*(c*g-h*p)+(e*u-i*o)*(c*m-f*p)+(n*s-r*a)*(l*g-h*d)-(n*u-i*a)*(l*m-f*d)+(r*u-i*s)*(l*p-c*d)},equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],l=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],m=t[13],g=t[14],v=t[15],w=e[0],y=e[1],b=e[2],M=e[3],x=e[4],k=e[5],T=e[6],E=e[7],S=e[8],_=e[9],F=e[10],A=e[11],I=e[12],O=e[13],j=e[14],N=e[15],P=$();return Math.abs(n-w)<=P*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(r-y)<=P*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(i-b)<=P*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-M)<=P*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-x)<=P*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(s-k)<=P*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(u-T)<=P*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(l-E)<=P*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(c-S)<=P*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-_)<=P*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(h-F)<=P*Math.max(1,Math.abs(h),Math.abs(F))&&Math.abs(d-A)<=P*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-I)<=P*Math.max(1,Math.abs(p),Math.abs(I))&&Math.abs(m-O)<=P*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(g-j)<=P*Math.max(1,Math.abs(g),Math.abs(j))&&Math.abs(v-N)<=P*Math.max(1,Math.abs(v),Math.abs(N))},exactEquals:function(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]},frob:function(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)},fromQuat:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,f=r*s,h=i*a,d=i*s,p=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-f-p,t[1]=c+v,t[2]=h-g,t[3]=0,t[4]=c-v,t[5]=1-l-p,t[6]=d+m,t[7]=0,t[8]=h+g,t[9]=d-m,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=V,r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=2*(s*a+c*r+u*o-l*i)/f,n[1]=2*(u*a+c*i+l*r-s*o)/f,n[2]=2*(l*a+c*o+s*i-u*r)/f):(n[0]=2*(s*a+c*r+u*o-l*i),n[1]=2*(u*a+c*i+l*r-s*o),n[2]=2*(l*a+c*o+s*i-u*r)),L(t,e,n),t},fromRotation:function(t,e,n){if(0===e)return D(t);let r,i,o,a=n[0],s=n[1],u=n[2],l=Math.sqrt(a*a+s*s+u*u);return l<$()?null:(l=1/l,a*=l,s*=l,u*=l,r=Math.sin(e),i=Math.cos(e),o=1-i,t[0]=a*a*o+i,t[1]=s*a*o+u*r,t[2]=u*a*o-s*r,t[3]=0,t[4]=a*s*o-u*r,t[5]=s*s*o+i,t[6]=u*s*o+a*r,t[7]=0,t[8]=a*u*o+s*r,t[9]=s*u*o-a*r,t[10]=u*u*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromRotationTranslation:L,fromRotationTranslationScale:function(t,e,n,r){const i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,l=o+o,c=a+a,f=i*u,h=i*l,d=i*c,p=o*l,m=o*c,g=a*c,v=s*u,w=s*l,y=s*c,b=r[0],M=r[1],x=r[2];return t[0]=(1-(p+g))*b,t[1]=(h+y)*b,t[2]=(d-w)*b,t[3]=0,t[4]=(h-y)*M,t[5]=(1-(f+g))*M,t[6]=(m+v)*M,t[7]=0,t[8]=(d+w)*x,t[9]=(m-v)*x,t[10]=(1-(f+p))*x,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,n,r,i){const o=e[0],a=e[1],s=e[2],u=e[3],l=o+o,c=a+a,f=s+s,h=o*l,d=o*c,p=o*f,m=a*c,g=a*f,v=s*f,w=u*l,y=u*c,b=u*f,M=r[0],x=r[1],k=r[2],T=i[0],E=i[1],S=i[2],_=(1-(m+v))*M,F=(d+b)*M,A=(p-y)*M,I=(d-b)*x,O=(1-(h+v))*x,j=(g+w)*x,N=(p+y)*k,P=(g-w)*k,$=(1-(h+m))*k;return t[0]=_,t[1]=F,t[2]=A,t[3]=0,t[4]=I,t[5]=O,t[6]=j,t[7]=0,t[8]=N,t[9]=P,t[10]=$,t[11]=0,t[12]=n[0]+T-(_*T+I*E+N*S),t[13]=n[1]+E-(F*T+O*E+P*S),t[14]=n[2]+S-(A*T+j*E+$*S),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:function(t,e){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]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromXRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,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},frustum:function(t,e,n,r,i,o,a){const s=1/(n-e),u=1/(i-r),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],l=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(o*o+a*a+s*s),t[2]=Math.sqrt(u*u+l*l+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]},identity:D,invert:W,invertOrIdentity:function(t,e){return W(t,e)||D(t),t},isOrthoNormal:function(t){const e=$(),n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],u=t[8],l=t[9],c=t[10];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(r*r+a*a+l*l))<=e&&Math.abs(1-(i*i+s*s+c*c))<=e},lookAt:function(t,e,n,r){const i=e[0],o=e[1],a=e[2];let s=i-n[0],u=o-n[1],l=a-n[2];const c=$();if(Math.abs(s)<c&&Math.abs(u)<c&&Math.abs(l)<c)return void D(t);let f=1/Math.sqrt(s*s+u*u+l*l);s*=f,u*=f,l*=f;const h=r[0],d=r[1],p=r[2];let m=d*l-p*u,g=p*s-h*l,v=h*u-d*s;f=Math.sqrt(m*m+g*g+v*v),f?(f=1/f,m*=f,g*=f,v*=f):(m=0,g=0,v=0);let w=u*v-l*g,y=l*m-s*v,b=s*g-u*m;f=Math.sqrt(w*w+y*y+b*b),f?(f=1/f,w*=f,y*=f,b*=f):(w=0,y=0,b=0),t[0]=m,t[1]=w,t[2]=s,t[3]=0,t[4]=g,t[5]=y,t[6]=u,t[7]=0,t[8]=v,t[9]=b,t[10]=l,t[11]=0,t[12]=-(m*i+g*o+v*a),t[13]=-(w*i+y*o+b*a),t[14]=-(s*i+u*o+l*a),t[15]=1},mul:J,multiply:J,multiplyScalar:function(t,e,n){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]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,i,o,a){const s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t},perspective:function(t,e,n,r,i){const o=1/Math.tan(e/2);let a;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(r-i),t[10]=(i+r)*a,t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),l=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:function(t,e,n,r){let i,o,a,s,u,l,c,f,h,d,p,m,g,v,w,y,b,M,x,k,T,E,S,_,F=r[0],A=r[1],I=r[2],O=Math.sqrt(F*F+A*A+I*I);return O<$()?null:(O=1/O,F*=O,A*=O,I*=O,i=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],u=e[1],l=e[2],c=e[3],f=e[4],h=e[5],d=e[6],p=e[7],m=e[8],g=e[9],v=e[10],w=e[11],y=F*F*a+o,b=A*F*a+I*i,M=I*F*a-A*i,x=F*A*a-I*i,k=A*A*a+o,T=I*A*a+F*i,E=F*I*a+A*i,S=A*I*a-F*i,_=I*I*a+o,t[0]=s*y+f*b+m*M,t[1]=u*y+h*b+g*M,t[2]=l*y+d*b+v*M,t[3]=c*y+p*b+w*M,t[4]=s*x+f*k+m*T,t[5]=u*x+h*k+g*T,t[6]=l*x+d*k+v*T,t[7]=c*x+p*k+w*T,t[8]=s*E+f*S+m*_,t[9]=u*E+h*S+g*_,t[10]=l*E+d*S+v*_,t[11]=c*E+p*S+w*_,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+f*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=f*i-s*r,t[11]=h*i-u*r,t},rotateY:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-l*r,t[1]=a*i-c*r,t[2]=s*i-f*r,t[3]=u*i-h*r,t[8]=o*r+l*i,t[9]=a*r+c*i,t[10]=s*r+f*i,t[11]=u*r+h*i,t},rotateZ:function(t,e,n){const r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(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[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+f*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=f*i-s*r,t[7]=h*i-u*r,t},scale:function(t,e,n){const r=n[0],i=n[1],o=n[2];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]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:C,str:function(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]+")"},sub:B,subtract:B,targetTo:function(t,e,n,r){const i=e[0],o=e[1],a=e[2],s=r[0],u=r[1],l=r[2];let c=i-n[0],f=o-n[1],h=a-n[2],d=c*c+f*f+h*h;d>0&&(d=1/Math.sqrt(d),c*=d,f*=d,h*=d);let p=u*h-l*f,m=l*c-s*h,g=s*f-u*c;return d=p*p+m*m+g*g,d>0&&(d=1/Math.sqrt(d),p*=d,m*=d,g*=d),t[0]=p,t[1]=m,t[2]=g,t[3]=0,t[4]=f*g-h*m,t[5]=h*p-c*g,t[6]=c*m-f*p,t[7]=0,t[8]=c,t[9]=f,t[10]=h,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:function(t,e,n){const r=n[0],i=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*i+e[8]*o+e[12],t[13]=e[1]*r+e[5]*i+e[9]*o+e[13],t[14]=e[2]*r+e[6]*i+e[10]*o+e[14],t[15]=e[3]*r+e[7]*i+e[11]*o+e[15];else{const n=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=e[7],d=e[8],p=e[9],m=e[10],g=e[11];t[0]=n,t[1]=a,t[2]=s,t[3]=u,t[4]=l,t[5]=c,t[6]=f,t[7]=h,t[8]=d,t[9]=p,t[10]=m,t[11]=g,t[12]=n*r+l*i+d*o+e[12],t[13]=a*r+c*i+p*o+e[13],t[14]=s*r+f*i+m*o+e[14],t[15]=u*r+h*i+g*o+e[15]}return t},transpose:z},Symbol.toStringTag,{value:"Module"}));class Y{constructor(t,e,n){this.strength=t,this.radius=e,this.threshold=n,this.type="bloom"}interpolate(t,e,n){this.strength=Q(t.strength,e.strength,n),this.radius=Q(t.radius,e.radius,n),this.threshold=Q(t.threshold,e.threshold,n)}clone(){return new Y(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:tt(this.radius),strength:this.strength,threshold:this.threshold}}}class Z{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,n){this.radius=Math.round(Q(t.radius,e.radius,n))}clone(){return new Z(this.radius)}toJSON(){return{type:"blur",radius:tt(this.radius)}}}class X{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.amount=Q(t.amount,e.amount,n),this._updateMatrix()}clone(){return new X(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||k();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const n=C(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return z(n,n)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const n=C(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return z(n,n)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,n=C(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return z(n,n)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const n=1-2*e,r=C(t,n,0,0,e,0,n,0,e,0,0,n,e,0,0,0,1);return z(r,r)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const n=C(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 z(n,n)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,n=C(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return z(n,n)})(t)}}}class G{constructor(t,e,n,r){this.offsetX=t,this.offsetY=e,this.blurRadius=n,this.color=r,this.type="drop-shadow"}interpolate(t,e,n){this.offsetX=Q(t.offsetX,e.offsetX,n),this.offsetY=Q(t.offsetY,e.offsetY,n),this.blurRadius=Q(t.blurRadius,e.blurRadius,n),this.color[0]=Math.round(Q(t.color[0],e.color[0],n)),this.color[1]=Math.round(Q(t.color[1],e.color[1],n)),this.color[2]=Math.round(Q(t.color[2],e.color[2],n)),this.color[3]=Q(t.color[3],e.color[3],n)}clone(){return new G(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:tt(this.offsetX),yoffset:tt(this.offsetY),blurRadius:tt(this.blurRadius),color:t}}}class H{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.angle=Q(t.angle,e.angle,n),this._updateMatrix()}clone(){return new H(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||k();this._colorMatrix=((t,e)=>{const n=Math.sin(e*Math.PI/180),r=Math.cos(e*Math.PI/180),i=C(t,.213+.787*r-.213*n,.715-.715*r-.715*n,.072-.072*r+.928*n,0,.213-.213*r+.143*n,.715+.285*r+.14*n,.072-.072*r-.283*n,0,.213-.213*r-.787*n,.715-.715*r+.715*n,.072+.928*r+.072*n,0,0,0,0,1);return z(i,i)})(t,this.angle)}}class K{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,n){this.amount=Q(t.amount,e.amount,n)}clone(){return new K(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function Q(t,e,n){return t+(e-t)*n}function tt(t){return Math.round(1e3*((e=t)?72*e/96:0))/1e3;var e}function et(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new X(t.type,0);case"saturate":case"brightness":case"contrast":return new X(t.type,1);case"opacity":return new K(1);case"hue-rotate":return new H(0);case"blur":return new Z(0);case"drop-shadow":return new G(0,0,0,[...M("transparent")]);case"bloom":return new Y(0,0,1)}}function nt(t,e){const n=t.length>e.length?t:e;return(t.length>e.length?e:t).every(((t,e)=>t.type===n[e].type))}function rt(t,e){const n=t.length>e.length?t:e,r=t.length>e.length?e:t;for(let t=r.length;t<n.length;t++)r.push(et(n[t]))}var it,ot,at={exports:{}};ot=function(){function t(e,n,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,t.prototype),o.expected=n,o.found=r,o.location=i,o.name="SyntaxError",o}function e(t,e,n){return n=n||" ",t.length>e?t:t+(n+=n.repeat(e-=t.length)).slice(0,e)}return function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}(t,Error),t.prototype.format=function(t){var n="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){i=t[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,a=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,s=this.location.source+":"+a.line+":"+a.column;if(i){var u=this.location.end,l=e("",a.line.toString().length," "),c=i[o.line-1],f=(o.line===u.line?u.column:c.length+1)-o.column||1;n+="\n --\x3e "+s+"\n"+l+" |\n"+a.line+" | "+c+"\n"+l+" | "+e("",o.column-1," ")+e("",f,"^")}else n+="\n at "+s}return n},t.buildMessage=function(t,e){var n={literal:function(t){return'"'+i(t.text)+'"'},class:function(t){var e=t.parts.map((function(t){return Array.isArray(t)?o(t[0])+"-"+o(t[1]):o(t)}));return"["+(t.inverted?"^":"")+e.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function r(t){return t.charCodeAt(0).toString(16).toUpperCase()}function i(t){return t.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(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function o(t){return t.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(t){return"\\x0"+r(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+r(t)}))}function a(t){return n[t.type](t)}return"Expected "+function(t){var e,n,r=t.map(a);if(r.sort(),r.length>0){for(e=1,n=1;e<r.length;e++)r[e-1]!==r[e]&&(r[n]=r[e],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+function(t){return t?'"'+i(t)+'"':"end of input"}(e)+" found."},{SyntaxError:t,parse:function(e,n){var r,i={},o=(n=void 0!==n?n:{}).grammarSource,a={start:Lt},s=Lt,u="none",l=")",c=",",f="(",h="%",d="px",p="cm",m="mm",g="in",v="pt",w="pc",y="deg",b="rad",M="grad",x="turn",k="#",T=".",E="e",S=/^[ \t\n\r]/,_=/^[a-z\-]/,F=/^[0-9a-fA-F]/,A=/^[+\-]/,I=/^[0-9]/,O=zt("none"),j=Ct("none",!1),N=Ct(")",!1),P=Ct(",",!1),$=zt("whitespace"),R=Dt([" ","\t","\n","\r"],!1,!1),q=zt("function"),U=Ct("(",!1),C=zt("identifier"),D=Dt([["a","z"],"-"],!1,!1),z=zt("percentage"),W=Ct("%",!1),J=zt("length"),L=Ct("px",!1),V=Ct("cm",!1),B=Ct("mm",!1),Y=Ct("in",!1),Z=Ct("pt",!1),X=Ct("pc",!1),G=zt("angle"),H=Ct("deg",!1),K=Ct("rad",!1),Q=Ct("grad",!1),tt=Ct("turn",!1),et=zt("number"),nt=zt("color"),rt=Ct("#",!1),it=Dt([["0","9"],["a","f"],["A","F"]],!1,!1),ot=Dt(["+","-"],!1,!1),at=Dt([["0","9"]],!1,!1),st=Ct(".",!1),ut=Ct("e",!1),lt=function(){return[]},ct=function(t,e){return{type:"function",name:t,parameters:e||[]}},ft=function(t,e){return e.length>0?function(t,e){return[t].concat(function(t){return t.map((function(t){return t[3]}))}(e))}(t,e):[t]},ht=function(t){return{type:"quantity",value:t.value,unit:t.unit}},dt=function(t){return{type:"color",colorType:t.type,value:t.value}},pt=function(t){return t},mt=function(){return Ut()},gt=function(t){return{value:t,unit:"%"}},vt=function(t){return{value:t,unit:"px"}},wt=function(t){return{value:t,unit:"cm"}},yt=function(t){return{value:t,unit:"mm"}},bt=function(t){return{value:t,unit:"in"}},Mt=function(t){return{value:t,unit:"pt"}},xt=function(t){return{value:t,unit:"pc"}},kt=function(t){return{value:t,unit:"deg"}},Tt=function(t){return{value:t,unit:"rad"}},Et=function(t){return{value:t,unit:"grad"}},St=function(t){return{value:t,unit:"turn"}},_t=function(t){return{value:t,unit:null}},Ft=function(){return{type:"hex",value:Ut()}},At=function(t){return{type:"function",value:t}},It=function(){return{type:"named",value:Ut()}},Ot=function(){return parseFloat(Ut())},jt=0,Nt=0,Pt=[{line:1,column:1}],$t=0,Rt=[],qt=0;if("startRule"in n){if(!(n.startRule in a))throw new Error("Can't start parsing from rule \""+n.startRule+'".');s=a[n.startRule]}function Ut(){return e.substring(Nt,jt)}function Ct(t,e){return{type:"literal",text:t,ignoreCase:e}}function Dt(t,e,n){return{type:"class",parts:t,inverted:e,ignoreCase:n}}function zt(t){return{type:"other",description:t}}function Wt(t){var n,r=Pt[t];if(r)return r;for(n=t-1;!Pt[n];)n--;for(r={line:(r=Pt[n]).line,column:r.column};n<t;)10===e.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return Pt[t]=r,r}function Jt(t){jt<$t||(jt>$t&&($t=jt,Rt=[]),Rt.push(t))}function Lt(){var t;return(t=Vt())===i&&(t=function(){var t,e;if(t=[],(e=Bt())!==i)for(;e!==i;)t.push(e),e=Bt();else t=i;return t}()),t}function Vt(){var t,n;return qt++,t=jt,Zt(),e.substr(jt,4)===u?(n=u,jt+=4):(n=i,0===qt&&Jt(j)),n!==i?(Zt(),Nt=t,t=lt()):(jt=t,t=i),qt--,t===i&&0===qt&&Jt(O),t}function Bt(){var t,n,r,o;return t=jt,Zt(),(n=function(){var t,n,r;return qt++,t=jt,(n=Xt())!==i?(40===e.charCodeAt(jt)?(r=f,jt++):(r=i,0===qt&&Jt(U)),r!==i?(Nt=t,t=pt(n)):(jt=t,t=i)):(jt=t,t=i),qt--,t===i&&(n=i,0===qt&&Jt(q)),t}())!==i?(Zt(),(r=function(){var t,n,r,o,a,s,u,l;if(t=jt,(n=Yt())!==i){for(r=[],o=jt,a=Zt(),44===e.charCodeAt(jt)?(s=c,jt++):(s=i,0===qt&&Jt(P)),s===i&&(s=null),u=Zt(),(l=Yt())!==i?o=a=[a,s,u,l]:(jt=o,o=i);o!==i;)r.push(o),o=jt,a=Zt(),44===e.charCodeAt(jt)?(s=c,jt++):(s=i,0===qt&&Jt(P)),s===i&&(s=null),u=Zt(),(l=Yt())!==i?o=a=[a,s,u,l]:(jt=o,o=i);Nt=t,t=ft(n,r)}else jt=t,t=i;return t}())===i&&(r=null),Zt(),41===e.charCodeAt(jt)?(o=l,jt++):(o=i,0===qt&&Jt(N)),o!==i?(Zt(),Nt=t,t=ct(n,r)):(jt=t,t=i)):(jt=t,t=i),t}function Yt(){var t,e;return t=jt,(e=Gt())===i&&(e=Ht())===i&&(e=Kt())===i&&(e=function(){var t,e;return qt++,t=jt,Zt(),(e=te())!==i?(Nt=t,t=_t(e)):(jt=t,t=i),qt--,t===i&&0===qt&&Jt(et),t}()),e!==i&&(Nt=t,e=ht(e)),(t=e)===i&&(t=jt,(e=Qt())!==i&&(Nt=t,e=dt(e)),t=e),t}function Zt(){var t,n;for(qt++,t=[],S.test(e.charAt(jt))?(n=e.charAt(jt),jt++):(n=i,0===qt&&Jt(R));n!==i;)t.push(n),S.test(e.charAt(jt))?(n=e.charAt(jt),jt++):(n=i,0===qt&&Jt(R));return qt--,n=i,0===qt&&Jt($),t}function Xt(){var t,n,r;if(qt++,t=jt,n=[],_.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(D)),r!==i)for(;r!==i;)n.push(r),_.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(D));else n=i;return n!==i&&(Nt=t,n=mt()),qt--,(t=n)===i&&(n=i,0===qt&&Jt(C)),t}function Gt(){var t,n,r;return qt++,t=jt,Zt(),(n=te())!==i?(37===e.charCodeAt(jt)?(r=h,jt++):(r=i,0===qt&&Jt(W)),r!==i?(Nt=t,t=gt(n)):(jt=t,t=i)):(jt=t,t=i),qt--,t===i&&0===qt&&Jt(z),t}function Ht(){var t,n,r;return qt++,t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===d?(r=d,jt+=2):(r=i,0===qt&&Jt(L)),r!==i?(Nt=t,t=vt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===p?(r=p,jt+=2):(r=i,0===qt&&Jt(V)),r!==i?(Nt=t,t=wt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===m?(r=m,jt+=2):(r=i,0===qt&&Jt(B)),r!==i?(Nt=t,t=yt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===g?(r=g,jt+=2):(r=i,0===qt&&Jt(Y)),r!==i?(Nt=t,t=bt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===v?(r=v,jt+=2):(r=i,0===qt&&Jt(Z)),r!==i?(Nt=t,t=Mt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,Zt(),(n=te())!==i?(e.substr(jt,2)===w?(r=w,jt+=2):(r=i,0===qt&&Jt(X)),r!==i?(Nt=t,t=xt(n)):(jt=t,t=i)):(jt=t,t=i)))))),qt--,t===i&&0===qt&&Jt(J),t}function Kt(){var t,n,r;return qt++,t=jt,(n=te())!==i?(e.substr(jt,3)===y?(r=y,jt+=3):(r=i,0===qt&&Jt(H)),r!==i?(Nt=t,t=kt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,(n=te())!==i?(e.substr(jt,3)===b?(r=b,jt+=3):(r=i,0===qt&&Jt(K)),r!==i?(Nt=t,t=Tt(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,(n=te())!==i?(e.substr(jt,4)===M?(r=M,jt+=4):(r=i,0===qt&&Jt(Q)),r!==i?(Nt=t,t=Et(n)):(jt=t,t=i)):(jt=t,t=i),t===i&&(t=jt,(n=te())!==i?(e.substr(jt,4)===x?(r=x,jt+=4):(r=i,0===qt&&Jt(tt)),r!==i?(Nt=t,t=St(n)):(jt=t,t=i)):(jt=t,t=i)))),qt--,t===i&&(n=i,0===qt&&Jt(G)),t}function Qt(){var t,n,r,o;if(qt++,t=jt,35===e.charCodeAt(jt)?(n=k,jt++):(n=i,0===qt&&Jt(rt)),n!==i){if(r=[],F.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(it)),o!==i)for(;o!==i;)r.push(o),F.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(it));else r=i;r!==i?(Nt=t,t=Ft()):(jt=t,t=i)}else jt=t,t=i;return t===i&&(t=jt,(n=Bt())!==i&&(Nt=t,n=At(n)),(t=n)===i&&(t=jt,(n=Xt())!==i&&(Nt=t,n=It()),t=n)),qt--,t===i&&(n=i,0===qt&&Jt(nt)),t}function te(){var t,n,r,o,a,s,u;for(t=jt,A.test(e.charAt(jt))?(e.charAt(jt),jt++):0===qt&&Jt(ot),n=jt,r=[],I.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(at));o!==i;)r.push(o),I.test(e.charAt(jt))?(o=e.charAt(jt),jt++):(o=i,0===qt&&Jt(at));if(46===e.charCodeAt(jt)?(o=T,jt++):(o=i,0===qt&&Jt(st)),o!==i){if(a=[],I.test(e.charAt(jt))?(s=e.charAt(jt),jt++):(s=i,0===qt&&Jt(at)),s!==i)for(;s!==i;)a.push(s),I.test(e.charAt(jt))?(s=e.charAt(jt),jt++):(s=i,0===qt&&Jt(at));else a=i;a!==i?n=r=[r,o,a]:(jt=n,n=i)}else jt=n,n=i;if(n===i)if(n=[],I.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(at)),r!==i)for(;r!==i;)n.push(r),I.test(e.charAt(jt))?(r=e.charAt(jt),jt++):(r=i,0===qt&&Jt(at));else n=i;if(n!==i){if(r=jt,101===e.charCodeAt(jt)?(o=E,jt++):(o=i,0===qt&&Jt(ut)),o!==i){if(A.test(e.charAt(jt))?(a=e.charAt(jt),jt++):(a=i,0===qt&&Jt(ot)),a===i&&(a=null),s=[],I.test(e.charAt(jt))?(u=e.charAt(jt),jt++):(u=i,0===qt&&Jt(at)),u!==i)for(;u!==i;)s.push(u),I.test(e.charAt(jt))?(u=e.charAt(jt),jt++):(u=i,0===qt&&Jt(at));else s=i;s!==i?r=o=[o,a,s]:(jt=r,r=i)}else jt=r,r=i;r===i&&(r=null),Nt=t,t=Ot()}else jt=t,t=i;return t}if((r=s())!==i&&jt===e.length)return r;throw r!==i&&jt<e.length&&Jt({type:"end"}),function(e,n,r){return new t(t.buildMessage(e,n),e,n,r)}(Rt,$t<e.length?e.charAt($t):null,function(t,e){var n=Wt(t),r=Wt(e);return{source:o,start:{offset:t,line:n.line,column:n.column},end:{offset:e,line:r.line,column:r.column}}}($t,$t<e.length?$t+1:$t))}}},(it=at).exports&&(it.exports=ot());var st=at.exports;function ut(t){if(!t||0===t.length)return null;if("string"==typeof t){const e=lt(t);return e&&0!==e.length?e:null}const e=t.map((t=>{if(!Number.isFinite(t.scale)||t.scale<=0)throw new y("effect:invalid-scale","scale must be finite and greater than 0",{stop:t});return{scale:t.scale,effects:lt(t.value)}}));e.sort(((t,e)=>e.effects.length-t.effects.length));for(let t=0;t<e.length-1;t++){if(!nt(e[t].effects,e[t+1].effects))throw new y("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:e[t].effects,b:e[t+1].effects});rt(e[t].effects,e[t+1].effects)}return e.sort(((t,e)=>e.scale-t.scale)),e}function lt(t){let e;if(!t)return[];try{e=st.parse(t)}catch(e){throw new y("effect:invalid-syntax","Invalid effect syntax",{value:t,error:e})}return e.map((t=>function(t){try{switch(t.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(t){let e=1;return ct(t.parameters,1),1===t.parameters.length&&(e=mt(t.parameters[0])),new X(t.name,e)}(t);case"opacity":return function(t){let e=1;return ct(t.parameters,1),1===t.parameters.length&&(e=mt(t.parameters[0])),new K(e)}(t);case"hue-rotate":return function(t){let e=0;return ct(t.parameters,1),1===t.parameters.length&&(e=function(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=dt[t.unit]))throw new y("effect:type-error",`Expected <angle>, Actual: ${ft(t)}`,{term:t})}(t),t.value*dt[t.unit]||0}(t.parameters[0])),new H(e)}(t);case"blur":return function(t){let e=0;return ct(t.parameters,1),1===t.parameters.length&&(e=gt(t.parameters[0]),ht(e,t.parameters[0])),new Z(e)}(t);case"drop-shadow":return function(t){const e=[];let n=null;for(const r of t.parameters)if("color"===r.type){if(e.length&&Object.freeze(e),n)throw new y("effect:type-error","Accepts only one color",{});n=vt(r)}else{const t=gt(r);if(Object.isFrozen(e))throw new y("effect:type-error","<length> parameters not consecutive",{lengths:e});e.push(t),3===e.length&&ht(t,r)}if(e.length<2||e.length>3)throw new y("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${e.length}}`,{lengths:e});return new G(e[0],e[1],e[2]||0,n||wt("black"))}(t);case"bloom":return function(t){let e=1,n=0,r=0;return ct(t.parameters,3),t.parameters[0]&&(e=mt(t.parameters[0])),t.parameters[1]&&(n=gt(t.parameters[1]),ht(n,t.parameters[1])),t.parameters[2]&&(r=mt(t.parameters[2])),new Y(e,n,r)}(t)}}catch(e){throw e.details.filter=t,e}throw new y("effect:unknown-effect",`Effect '${t.name}' is not supported`,{effect:t})}(t)))}function ct(t,e){if(t.length>e)throw new y("effect:type-error",`Function supports up to ${e} parameters, Actual: ${t.length}`,{parameters:t})}function ft(t){if("color"===t.type)return"<color>";if(t.unit){if(t.unit in pt)return"<length>";if(t.unit in dt)return"<angle>";if("%"===t.unit)return"<percentage>"}return"<double>"}function ht(t,e){if(t<0)throw new y("effect:type-error",`Negative values are not allowed, Actual: ${t}`,{term:e})}const dt={deg:1,grad:.9,rad:180/Math.PI,turn:360},pt={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function mt(t){!function(t){if("quantity"!==t.type||null!==t.unit&&"%"!==t.unit)throw new y("effect:type-error",`Expected <double> or <percentage>, Actual: ${ft(t)}`,{term:t})}(t);const e=t.value;return ht(e,t),"%"===t.unit?.01*e:e}function gt(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=pt[t.unit]))throw new y("effect:type-error",`Expected <length>, Actual: ${ft(t)}`,{term:t})}(t),t.value*pt[t.unit]||0}function vt(t){switch(t.colorType){case"hex":return function(t){const e=t.length>5,n=e?8:4,r=(1<<n)-1,i=e?1:17,o=e?9===t.length:5===t.length;let a=Number("0x"+t.substr(1));if(isNaN(a))return null;const s=[0,0,0,1];let u;return o&&(u=a&r,a>>=n,s[3]=i*u/255),u=a&r,a>>=n,s[2]=i*u,u=a&r,a>>=n,s[1]=i*u,u=a&r,a>>=n,s[0]=i*u,s}(t.value);case"named":return wt(t.value);case"function":return function(t){if(ct(t.parameters,4),yt.test(t.name))return[mt(t.parameters[0]),mt(t.parameters[1]),mt(t.parameters[2]),t.parameters[3]?mt(t.parameters[3]):1];if(bt.test(t.name))return function(t,e,n,r=1){const i=(t%360+360)%360/360,o=n<=.5?n*(e+1):n+e-n*e,a=2*n-o;return[Math.round(255*x(a,o,i+1/3)),Math.round(255*x(a,o,i)),Math.round(255*x(a,o,i-1/3)),r]}(function(t){return function(t){if("quantity"!==t.type||null!==t.unit)throw new y("effect:type-error",`Expected <double>, Actual: ${ft(t)}`,{term:t})}(t),ht(t.value,t),t.value}(t.parameters[0]),mt(t.parameters[1]),mt(t.parameters[2]),t.parameters[3]?mt(t.parameters[3]):1);throw new y("effect:syntax-error",`Invalid color function '${t.name}'`,{colorFunction:t})}(t.value)}}function wt(t){if(!function(t){return!!b[t]||!!b[t.toLowerCase()]}(t))throw new y("effect:unknown-color",`color '${t}' isn't valid`,{namedColor:t});return function(t){return[...M(t)]}(t)}const yt=/^rgba?/i,bt=/^hsla?/i;function Mt(t){const e=ut(t);return e?function(t){const e=t[0];return!!e&&"type"in e}(e)?e.map((t=>t.toJSON())):e.map((({scale:t,effects:e})=>({scale:t,value:e.map((t=>t.toJSON()))}))):null}function xt(t){if(!t||0===t.length)return null;if(function(t){const e=t[0];return!!e&&"scale"in e}(t)){const e=[];for(const n of t)e.push({scale:n.scale,value:kt(n.value)});return e}return kt(t)}function kt(t){if(!t?.length)return"";const e=[];for(const n of t){let t=[];switch(n.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":t=[Tt(n,"amount")];break;case"blur":t=[Tt(n,"radius","pt")];break;case"hue-rotate":t=[Tt(n,"angle","deg")];break;case"drop-shadow":t=[Tt(n,"xoffset","pt"),Tt(n,"yoffset","pt"),Tt(n,"blurRadius","pt"),Et(n,"color")];break;case"bloom":t=[Tt(n,"strength"),Tt(n,"radius","pt"),Tt(n,"threshold")]}const r=`${n.type}(${t.filter(Boolean).join(" ")})`;ut(r),e.push(r)}return e.join(" ")}function Tt(t,e,n){if(null==t[e])throw new y("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});return n?t[e]+n:""+t[e]}function Et(t,e){if(null==t[e])throw new y("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});const n=t[e];return`rgba(${n[0]||0}, ${n[1]||0}, ${n[2]||0}, ${n[3]/255||0})`}function St(t,e,n){const r=e?.layer;if(!t)return r?.effect?r.effect:r?.featureEffect?"includedEffect"===n?r.featureEffect.includedEffect:r.featureEffect.excludedEffect:null;const i=Mt(t);let o=null;o=r.featureEffect?"includedEffect"===n?r.featureEffect.includedEffect:r.featureEffect.excludedEffect:r.effect;const a=o?Mt(o):null;if(!a)return xt(i);let s=[...a];return i&&i.forEach((t=>{s.forEach((e=>{const{value:n}=e;if(n)n.forEach(((r,o)=>{r.type===t.type?n[o]=t:!e.value.find((t=>t.type===i[0].type))&&(e.value=[...e.value,...i])}));else{const n=!s.find((t=>t.type===e.type));!s.find((e=>e.type===t.type))&&(s=[...s,t]),n&&(s=[...s,e])}}))})),xt(s)}const _t="time-slider-watch",Ft=new class{constructor(){this.initializeModules()}async initializeModules(){try{const[t,e,n,r,i,o,s]=await a(["esri/core/Handles","esri/core/reactiveUtils","esri/widgets/TimeSlider","esri/TimeExtent","esri/TimeInterval","esri/layers/support/FeatureFilter","esri/layers/support/FeatureEffect"]);this.reactiveUtils=e,this.handles=new t,this.TimeSlider=n,this.TimeExtent=r,this.TimeInterval=i,this.FeatureFilter=o,this.FeatureEffect=s}catch(t){}}async init(t){t&&(t.innerHTML="");const{view:e,timeInfoConfigItems:n}=u;if(e)try{await e.when();const r=await this.getTimeLayerViews(e,n);return u.timeInfoItems=this.generateTimeInfoItems(r,n),this.initTimeSlider(t),this.setupFilterModeWatcher(),Promise.resolve()}catch(t){}}destroy(){var t,e;null===(t=this.handles)||void 0===t||t.removeAll(),this.handles=null,null===(e=u.timeSlider)||void 0===e||e.destroy()}async getTimeLayerViews(t,e){const{allLayers:n}=t.map,r=e.map((({id:t})=>{return e=t,n.find((({id:t})=>e===t));var e})).map((e=>t.whenLayerView(e)));return await Promise.all(r)}generateTimeInfoItems(t,e){return[...e].map((e=>{const n=t.find((({layer:t})=>t.id===e.id));return this.generateTimeInfoItem(n,e)}))}generateTimeInfoItem(t,{increments:e,rangeStart:n,rangeEnd:r}){var i;const o=null==t?void 0:t.layer,a=null===(i=null==o?void 0:o.timeInfo)||void 0===i?void 0:i.fullTimeExtent;return{layerView:t,unit:e,rangeStart:new Date(n),rangeEnd:new Date(r),timeExtent:a,previousTimeExtent:null}}initTimeSlider(t){var e,n;const r=null===(e=null==u?void 0:u.timeInfoItems)||void 0===e?void 0:e[0];if(!r)return;const{TimeSlider:i}=this;u.selectedTimeInfoItem=r;const o=this.getTimeSliderConfig(t);u.timeSlider=new i(o),"2d"===(null===(n=u.view)||void 0===n?void 0:n.type)&&this.initialize2DView()}setupFilterModeWatcher(){l("filterMode",(t=>u.timeInfoItems.forEach((e=>{var n,r,i;const o=e.layerView;this.applyTimeExtent(o,(null===(r=null===(n=null==o?void 0:o.featureEffect)||void 0===n?void 0:n.filter)||void 0===r?void 0:r.timeExtent)||(null===(i=o.filter)||void 0===i?void 0:i.timeExtent),t)}))))}getTimeSliderConfig(t){var e;const[{timeExtent:n,rangeStart:r,rangeEnd:i,unit:o}]=u.timeInfoItems,{TimeExtent:a,TimeInterval:s}=this;return{container:t,fullTimeExtent:n,timeExtent:new a({start:r,end:i}),mode:"time-window",loop:!0,stops:{interval:new s({unit:o,value:1})},view:"3d"===(null===(e=u.view)||void 0===e?void 0:e.type)?u.view:null}}initialize2DView(){u.timeInfoItems.forEach((t=>this.applyTimeExtent(t.layerView,new this.TimeExtent({start:t.rangeStart,end:t.rangeEnd})))),this.setupTimeExtentWatcher()}applyTimeExtent(t,e,n){var r;"effect"===(null===(r=u.filterMode)||void 0===r?void 0:r.type)?this.applyFeatureEffect(t,e,n):this.applyFeatureFilter(t,e)}applyFeatureEffect(t,e,n){t&&(t.filter&&t.set("filter",null),t.featureEffect&&!n?t.featureEffect.filter.timeExtent=e:this.handleUpdatedFeatureEffect(t,e))}handleUpdatedFeatureEffect(t,e){var n,r,i,o;const{FeatureEffect:a}=this;t.featureEffect=new a({filter:{timeExtent:e},includedEffect:St(null===(r=null===(n=u.filterMode)||void 0===n?void 0:n.effect)||void 0===r?void 0:r.includedEffect,t,"includedEffect"),excludedEffect:St(null===(o=null===(i=u.filterMode)||void 0===i?void 0:i.effect)||void 0===o?void 0:o.excludedEffect,t,"excludedEffect")})}applyFeatureFilter(t,e){t.featureEffect&&t.set("featureEffect",null),t.filter?t.filter.timeExtent=e:t.filter=new this.FeatureFilter({timeExtent:e})}setupTimeExtentWatcher(){var t,e,n,r;(null===(t=this.handles)||void 0===t?void 0:t.has(_t))&&(null===(e=this.handles)||void 0===e||e.remove(_t)),null===(n=this.handles)||void 0===n||n.add(null===(r=null==u?void 0:u.timeSlider)||void 0===r?void 0:r.watch("timeExtent",(t=>{var e;return this.applyTimeExtent(null===(e=u.selectedTimeInfoItem)||void 0===e?void 0:e.layerView,t)})),_t)}updateSelectedTimeInfoItem(t){u.timeSlider&&(u.selectedTimeInfoItem&&(u.selectedTimeInfoItem.previousTimeExtent=u.timeSlider.timeExtent),u.selectedTimeInfoItem=t,this.reconfigureTimeSlider(t),this.applyTimeExtent(t.layerView,u.timeSlider.timeExtent),this.setupTimeExtentWatcher())}reconfigureTimeSlider(t){u.timeSlider&&(u.timeSlider.fullTimeExtent=t.timeExtent,u.timeSlider.timeExtent=this.getTimeExtent(t),u.timeSlider.stops={interval:this.getTimeInterval(t)})}getTimeExtent({rangeStart:t,rangeEnd:e,previousTimeExtent:n}){const{TimeExtent:r}=this;return null!=n?n:new r({start:t,end:e})}getTimeInterval(t){var e,n,r,i,o;const{TimeInterval:a}=this;return new a({unit:null!==(e=t.unit)&&void 0!==e?e:null===(o=null===(i=null===(r=null===(n=t.layerView)||void 0===n?void 0:n.layer)||void 0===r?void 0:r.timeInfo)||void 0===i?void 0:i.interval)||void 0===o?void 0:o.unit,value:1})}getLabel(t){var e,n;return(null===(n=null===(e=null==t?void 0:t.layerView)||void 0===e?void 0:e.layer)||void 0===n?void 0:n.title)||""}},At=class{constructor(e){t(this,e),this.timeSliderRef=void 0,this.timeInfoConfigItems=[],this.filterMode=void 0,this.view=void 0}async updateTimeInfoConfigItems(){u.timeInfoConfigItems=this.timeInfoConfigItems,await Ft.init(this.timeSliderRef)}async updateFilterMode(){u.filterMode=this.filterMode}async componentWillLoad(){try{u.view=this.view,u.timeInfoConfigItems=this.timeInfoConfigItems,this.filterMode&&(u.filterMode=this.filterMode),await s(this)}catch(t){}}async componentDidLoad(){try{await Ft.init(this.timeSliderRef)}catch(t){}finally{u.loading=!1}}disconnectedcallback(){Ft.destroy()}render(){return e(n,{key:"bf0887f83b19239ce1b81efad5c356c7edc05ba1"},this._renderBase())}_renderBase(){return e("div",{class:"instant-apps-time-filter"+("2d"!==this.view.type?" instant-apps-time-filter--3d":"")},this._renderLoader(),this._renderMain())}_renderMain(){return e(r,null,"2d"===this.view.type&&this._renderTopEl(),e("div",{ref:t=>this.timeSliderRef=t}))}_renderLoader(){var t,n;return u.loading&&e(r,null,e("div",{class:"instant-apps-time-filter__background"}),e("div",{class:"instant-apps-time-filter__loading-container"},e("calcite-loader",{scale:"m",label:null===(t=this.messages)||void 0===t?void 0:t.loading,text:null===(n=this.messages)||void 0===n?void 0:n.loading})))}_renderTopEl(){return this.timeInfoConfigItems.length>1?this._renderDropdown():this._renderLayerTitle()}_renderLayerTitle(){var t,n,r;const i=null===(r=null===(n=null===(t=u.selectedTimeInfoItem)||void 0===t?void 0:t.layerView)||void 0===n?void 0:n.layer)||void 0===r?void 0:r.title;return e("span",{class:"instant-apps-time-filter__layer-title"},i)}_renderDropdown(){return u.selectedTimeInfoItem&&e("calcite-dropdown",null,this._renderDropdownButton(),this._renderDropdownItems())}_renderDropdownButton(){return e("calcite-button",{slot:"trigger",appearance:"transparent",iconEnd:"chevron-down",width:"full",alignment:"space-between"},Ft.getLabel(u.selectedTimeInfoItem))}_renderDropdownItems(){return u.timeInfoItems.map((t=>this._renderDropdownItem(t)))}_renderDropdownItem(t){var n,r,i,o,a;const s=null===(i=null===(r=null===(n=u.selectedTimeInfoItem)||void 0===n?void 0:n.layerView)||void 0===r?void 0:r.layer)||void 0===i?void 0:i.id,l=null===(a=null===(o=null==t?void 0:t.layerView)||void 0===o?void 0:o.layer)||void 0===a?void 0:a.id;return e("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>Ft.updateSelectedTimeInfoItem(t),selected:s===l},Ft.getLabel(t))}get el(){return i(this)}static get watchers(){return{timeInfoConfigItems:["updateTimeInfoConfigItems"],filterMode:["updateFilterMode"]}}};At.style=".instant-apps-time-filter{position:relative;display:block;min-width:375px;min-height:200px}.instant-apps-time-filter__background{background-color:var(--calcite-ui-background);position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}.instant-apps-time-filter calcite-dropdown{width:100%}.instant-apps-time-filter calcite-dropdown calcite-button{--calcite-color-brand:var(--calcite-ui-text-1);--calcite-ui-brand:var(--calcite-ui-text-1)}.instant-apps-time-filter__layer-title{font-weight:550;display:inline-block;padding:10px}.instant-apps-time-filter__loading-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.instant-apps-time-filter--3d{min-height:160px}";export{At as instant_apps_time_filter}
|