diff --git a/build.gradle.kts b/build.gradle.kts index 24ded25..d425fb5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,8 @@ val ktor_version: String by project val kotlin_version: String by project val logback_version: String by project val exposedVersion: String by project +val postgresqlVersion: String by project +val postgisVersion: String by project plugins { application @@ -25,20 +27,26 @@ repositories { } dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0") implementation("io.ktor:ktor-server-core-jvm:$ktor_version") implementation("io.ktor:ktor-server-netty-jvm:$ktor_version") implementation("ch.qos.logback:logback-classic:$logback_version") implementation("io.ktor:ktor-server-call-logging:$ktor_version") implementation("io.ktor:ktor-server-metrics-micrometer:$ktor_version") implementation("io.ktor:ktor-server-cors:$ktor_version") + implementation("io.ktor:ktor-server-sessions:$ktor_version") + implementation("io.ktor:ktor-server-auth:$ktor_version") + + implementation("org.mindrot:jbcrypt:0.4") implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion") implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion") + implementation("org.jetbrains.exposed:exposed-java-time:$exposedVersion") implementation("io.ktor:ktor-server-content-negotiation:$ktor_version") implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") - implementation("org.postgresql:postgresql:42.3.6") - implementation("net.postgis:postgis-jdbc:2021.1.0") + implementation("org.postgresql:postgresql:$postgresqlVersion") + implementation("net.postgis:postgis-jdbc:$postgisVersion") testImplementation("io.ktor:ktor-server-tests-jvm:$ktor_version") testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") diff --git a/gradle.properties b/gradle.properties index 5453c37..dbedbb0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,3 +3,5 @@ kotlin_version=1.7.0 logback_version=1.2.11 kotlin.code.style=official exposedVersion=0.38.2 +postgresqlVersion=42.3.6 +postgisVersion=2021.1.0 \ No newline at end of file diff --git a/src/main/js/pluckr-app/.eslintrc.js b/src/main/js/pluckr-app/.eslintrc.js new file mode 100644 index 0000000..d8a0155 --- /dev/null +++ b/src/main/js/pluckr-app/.eslintrc.js @@ -0,0 +1,13 @@ +module.exports = { + parserOptions: { + ecmaVersion: 13, + }, + extends: ['@open-wc', 'prettier'], + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { devDependencies: ['rollup.mapbox.js', 'rollup.config.js'] }, + ], + 'no-console': ['error', { allow: ['warn', 'error'] }], + }, +}; diff --git a/src/main/js/pluckr-app/package-lock.json b/src/main/js/pluckr-app/package-lock.json index 4a644cc..35028d5 100644 --- a/src/main/js/pluckr-app/package-lock.json +++ b/src/main/js/pluckr-app/package-lock.json @@ -10,9 +10,17 @@ "license": "MIT", "dependencies": { "@mapbox/mapbox-gl-geocoder": "^5.0.1", + "@vaadin/app-layout": "^23.1.3", + "@vaadin/button": "^23.1.3", + "@vaadin/dialog": "^23.1.4", + "@vaadin/form-layout": "^23.1.4", + "@vaadin/horizontal-layout": "^23.1.3", "@vaadin/icon": "^23.1.3", "@vaadin/icons": "^23.1.3", - "@vaadin/text-field": "^23.1.3", + "@vaadin/password-field": "^23.1.4", + "@vaadin/progress-bar": "^23.1.4", + "@vaadin/tabs": "^23.1.3", + "@vaadin/text-field": "^23.1.4", "leaflet": "^1.8.0", "leaflet-geosearch": "jlengrand/leaflet-geosearch#update", "lit": "^2.0.2", @@ -22,7 +30,7 @@ "@babel/preset-env": "^7.16.4", "@custom-elements-manifest/analyzer": "^0.4.17", "@open-wc/building-rollup": "^2.0.1", - "@open-wc/eslint-config": "^4.3.0", + "@open-wc/eslint-config": "^8.0.2", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-node-resolve": "^13.0.6", @@ -31,12 +39,12 @@ "@web/rollup-plugin-import-meta-assets": "^1.0.7", "babel-plugin-template-html-minifier": "^4.1.0", "deepmerge": "^4.2.2", - "eslint": "^7.32.0", + "eslint": "^8.22.0", "eslint-config-prettier": "^8.3.0", "husky": "^4.3.8", "koa-proxies": "^0.12.2", "lint-staged": "^10.5.4", - "prettier": "^2.4.1", + "prettier": "^2.7.1", "rimraf": "^3.0.2", "rollup": "^2.60.0", "rollup-plugin-terser": "^7.0.2", @@ -106,42 +114,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/eslint-parser": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.18.2.tgz", - "integrity": "sha512-oFQYkE8SuH14+uR51JVAmdqwKYXGRjEXx7s+WiagVjqQ+HPE+nnwyF2qlVG8evUsUHmPcA+6YXMEDbIhEyQc5A==", - "dev": true, - "peer": true, - "dependencies": { - "eslint-scope": "^5.1.1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.11.0", - "eslint": "^7.5.0 || ^8.0.0" - } - }, - "node_modules/@babel/eslint-plugin": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-7.17.7.tgz", - "integrity": "sha512-JATUoJJXSgwI0T8juxWYtK1JSgoLpIGUsCHIv+NMXcUDA2vIe6nvAHR9vnuJgs/P1hOFw7vPwibixzfqBBLIVw==", - "dev": true, - "peer": true, - "dependencies": { - "eslint-rule-composer": "^0.3.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/eslint-parser": ">=7.11.0", - "eslint": ">=7.5.0" - } - }, "node_modules/@babel/generator": { "version": "7.18.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", @@ -1651,9 +1623,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz", - "integrity": "sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz", + "integrity": "sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A==", "dev": true, "dependencies": { "core-js-pure": "^3.20.2", @@ -1732,29 +1704,29 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.16.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", - "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1779,12 +1751,12 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -1792,6 +1764,16 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -2146,26 +2128,25 @@ "integrity": "sha512-ukowSvzpZQDUH0Y3znJTsY88HkiGk3Khc0WGpIPhap1xlerieYi27QBg6wx/nTurpWfU6XXXsx9ocxDYCdtw0Q==" }, "node_modules/@open-wc/eslint-config": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@open-wc/eslint-config/-/eslint-config-4.3.0.tgz", - "integrity": "sha512-kCxFWQ1AR4meTmWJGnK36LJYqDJeFGjlj6n4vLjAW3/c1VUyYQKL90vrNKy/OHS9kTjc9dcH5D64myAbNx6r1w==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@open-wc/eslint-config/-/eslint-config-8.0.2.tgz", + "integrity": "sha512-ymOFXtsAXv1tkpW48touNZVGfV6X/ii/Ir+IZfFQi3KicJ/HF5wqK1x8Un4ZZzXravGqPqGfXCycKeyJf8s+pg==", "dev": true, "dependencies": { - "eslint": "^7.6.0", - "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-html": "^6.0.0", - "eslint-plugin-import": "^2.18.2", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-lit": "^1.2.0", - "eslint-plugin-lit-a11y": "^1.0.1", + "eslint-plugin-lit-a11y": "^2.2.2", "eslint-plugin-no-only-tests": "^2.4.0", "eslint-plugin-wc": "^1.2.0" }, "peerDependencies": { - "@babel/eslint-plugin": "^7.6.0", + "eslint": ">=7.6.0", "eslint-plugin-html": "^6.0.0", - "eslint-plugin-import": "^2.18.2", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-lit": "^1.3.0", - "eslint-plugin-lit-a11y": "^1.0.1", + "eslint-plugin-lit-a11y": "^2.2.2", "eslint-plugin-no-only-tests": "^2.4.0", "eslint-plugin-wc": "^1.2.0" } @@ -2592,10 +2573,36 @@ "@types/node": "*" } }, - "node_modules/@vaadin/component-base": { + "node_modules/@vaadin/app-layout": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.3.tgz", - "integrity": "sha512-+RBptC6XS6qbsEBouYuqPby4MwOGgLMjAP0eE+yifr29GZm8Pvfnz7703c9IXp2DdcvCBaNDNvPnsAdEpaAl9A==", + "resolved": "https://registry.npmjs.org/@vaadin/app-layout/-/app-layout-23.1.3.tgz", + "integrity": "sha512-/v8MX2XrHdxNuCbqUH6ytMzd/DXXE1tF1/1kvKNiQonrMw/0NyCid8A3mA+kqx1f4nx1gKamyKDvHcfqQjEWoQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.3", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "node_modules/@vaadin/button": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.4.tgz", + "integrity": "sha512-RIKl5wdLXfXAgh/6Ld2Goiww5uLR0QLB+In7fWKZmLaK6xByAhsoYeJCjdKjBCA3VwypvWpyy4M2LPdzKjAnzw==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/component-base": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.4.tgz", + "integrity": "sha512-qlMY0j2WWuEtVa/XN3yXVPmkrRP6JZ4SqXDpfrOXXmmXPouGPtBkLJ6qskabUyO9BO/pKgiOpVlmWbceu5L5/A==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", @@ -2604,26 +2611,65 @@ "lit": "^2.0.0" } }, - "node_modules/@vaadin/field-base": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.3.tgz", - "integrity": "sha512-rLO6JZj/H/5TtPMLho9U7NmlIHvBe4AtwlEqyjonX7DPw/ThSa2rtt3RKn8CKWTw8Zzgyx00q42CjNsSq2BjPA==", + "node_modules/@vaadin/dialog": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/dialog/-/dialog-23.1.4.tgz", + "integrity": "sha512-/gtSq/b7HaVTqpQBhgHW2qxMxH0VhwnUGuy1ykYYsd40y+A6leVHSzs3I37gsBbyXThw39dAvpq+uE/PLJf5Xg==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", + "@vaadin/component-base": "^23.1.4", + "@vaadin/lit-renderer": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-overlay": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/field-base": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.4.tgz", + "integrity": "sha512-lRJIyKcAKUPj5VIKWy0jyVZuUxWsBETiOEdBc4yQZVlSPCIdSu+LXUUIUychbzRlF8fDFxk/NRIaH/IYG4McCg==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", "lit": "^2.0.0" } }, - "node_modules/@vaadin/icon": { + "node_modules/@vaadin/form-layout": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/form-layout/-/form-layout-23.1.4.tgz", + "integrity": "sha512-jlITymNzINZqCW9tV1rC2TdE38GmCWkbi54J2wkNWtfAlhrASOQhyL0iBnfmOPbL87c5J8LSAfGGblNThTFEEA==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/horizontal-layout": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.3.tgz", - "integrity": "sha512-0rMRYKBlHw5T4WNYFYnVX7eLXevsSNhApfzFWr3T1BVVajSBECVe7eCt+jClibhAAbcNzYhAs8SC/rwY17AcOg==", + "resolved": "https://registry.npmjs.org/@vaadin/horizontal-layout/-/horizontal-layout-23.1.3.tgz", + "integrity": "sha512-dhOAlG0oI0UZXwfDLWJZ7D5T8hFxTNnAplJA0BJ52f42HYzgNLuC8nfokfW81gOI/iIVY+d//IU0JFRfKoJTFA==", "dependencies": { "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "node_modules/@vaadin/icon": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.4.tgz", + "integrity": "sha512-Av8vfElbKCU3alMlkDtofOccG9V3j9sOhqnPQ39HPfo+omAh1Ee6afXr67Qi7KayhpL4uD6po0PMbof1Xz3Qpw==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4", "lit": "^2.0.0" } }, @@ -2639,10 +2685,23 @@ } }, "node_modules/@vaadin/input-container": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.3.tgz", - "integrity": "sha512-+PFd8bWbnVy89HmYNc/uvUV4KuxOvFYBBrsmnpKKW5Tc5wzCMa6vCXEyyDxuiVOkFnHU24P7kBSyqia7HHjaTg==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.4.tgz", + "integrity": "sha512-+C7W/C/pFBFcuLONtPvvJmzXvEI/6YYID9VwpOIigDEvAVI0beJTiM6meHxfUMfxMHwvcUd5Y8hY2r/LOOnXyA==", "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/item": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/item/-/item-23.1.3.tgz", + "integrity": "sha512-jQsS8bhDMgMq3mfEjvGvnbQC9d3BL9R9+U3fKwkxPa6k8ASaYwtrRGIl3F+oRippAIBf/bDflfC09KjHEDAezA==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", @@ -2650,50 +2709,119 @@ "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, - "node_modules/@vaadin/text-field": { + "node_modules/@vaadin/lit-renderer": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-23.1.4.tgz", + "integrity": "sha512-XkF3t/Ya0NK/+2IyXe/iAS2FPkq/v64J70pkB8mneqUncEceitzQW/ODlf3wXx0wwxniPrsOUvYicD3Lhwu4qQ==", + "dependencies": { + "lit": "^2.0.0" + } + }, + "node_modules/@vaadin/password-field": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/password-field/-/password-field-23.1.4.tgz", + "integrity": "sha512-PkTarFwvLEkLMRsz4niJTDsf+lVmWXfm6UHIE69vbU5s63NUFolEOEyuq8JWYcDICKtvBYQ8uDH4zzpv3N5vmQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.4", + "@vaadin/text-field": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4" + } + }, + "node_modules/@vaadin/progress-bar": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/progress-bar/-/progress-bar-23.1.4.tgz", + "integrity": "sha512-GSCgUE0Kuv2+yxS/W0zxX7H6IEaGeFbwwHjV/GCopnrVLVv1DucfyAa0vSqmBucs+0Nu25Cx893V+BNL/dqmmw==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/tabs": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.3.tgz", - "integrity": "sha512-oYxJDo5AU+lE+vqY7otvYqnSoXf233/iJKISLF4C/d5pofx/GvnDx2/dSopvJ2OSp1S1mn/CaVPazjBeXY7eLg==", + "resolved": "https://registry.npmjs.org/@vaadin/tabs/-/tabs-23.1.3.tgz", + "integrity": "sha512-5qY3IcNpct7oTLOPB163Ca2WW5AjHEdKlerhS5QdQtVWYurJZHVfy/tgx+pqo/xflBZsPZKLH/LFd4m4OklnGg==", "dependencies": { "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", - "@vaadin/field-base": "^23.1.3", - "@vaadin/input-container": "^23.1.3", + "@vaadin/item": "^23.1.3", + "@vaadin/vaadin-list-mixin": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", "@vaadin/vaadin-material-styles": "^23.1.3", "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, + "node_modules/@vaadin/text-field": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.4.tgz", + "integrity": "sha512-pMaPR0KLaXb6PB3lscf7jJKRvUnGdB18oOmJKxiYO1vA0q6U8hUbeZ4ba2vGUl+m7hA6t6DbkTB4SBQdRq3tnQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/field-base": "^23.1.4", + "@vaadin/input-container": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, "node_modules/@vaadin/vaadin-development-mode-detector": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@vaadin/vaadin-development-mode-detector/-/vaadin-development-mode-detector-2.0.5.tgz", "integrity": "sha512-miirBQw10UHjKwRv29iZniXCo41cLg3wFotoyTeUZ2PTGIDk/fZVFr4Q4WVKZrp3D15878vz94nNQROSmPLjdg==" }, - "node_modules/@vaadin/vaadin-lumo-styles": { + "node_modules/@vaadin/vaadin-list-mixin": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.3.tgz", - "integrity": "sha512-edfO/By6M8s5tblxj7ze8x2CMgGr0O9ZKPeHatrl+yk1dNZLXKdgCbhZQdQxRrx7GiyVBkim7wDNBkpkWSpdZQ==", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-list-mixin/-/vaadin-list-mixin-23.1.3.tgz", + "integrity": "sha512-PpxHMUY0TSiVCwoxVSgBP1BVApfyEmXaBDgreeJ5Bt7ma+OMf35yrZDNwPqQPNs4cvAfADhDT7DhpWsqkHodOg==", + "dependencies": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3" + } + }, + "node_modules/@vaadin/vaadin-lumo-styles": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.4.tgz", + "integrity": "sha512-zZRpMRJ2xjDAX8FhnhclJIo1l+kySGcyJ+SaFVAa2nB85sC1JWdELmZGwSpCS+ZH1ss6lTp3XY5fniRuPO98WQ==", "dependencies": { "@polymer/iron-icon": "^3.0.0", "@polymer/iron-iconset-svg": "^3.0.0", "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/icon": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/vaadin-material-styles": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.3.tgz", - "integrity": "sha512-VPqa/ZxYa8t7tsxCkK+r/SedU413NDexBmDGmnLhn+zGHaL0qgbXQP/te7p8YCHhyEj/bOxwcgyNTFuPNeQb1w==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.4.tgz", + "integrity": "sha512-GLIMrFbK/jBFg+6LZI3XkVBKqGSzmf/Cd2rIU2+BcpMnOtUNXxe5Ip4WaPgzIJRemSNy1M1eS0GNimSiAS618w==", "dependencies": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "node_modules/@vaadin/vaadin-overlay": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-overlay/-/vaadin-overlay-23.1.4.tgz", + "integrity": "sha512-RvwgdfSDwYDn63fVVm3jrDcWbR47XX2wMon8lJSc+TQ5C43cDCpyhrjHFzR4BU/LJXCIlZ878wUrJYFZKI5QgQ==", + "dependencies": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "node_modules/@vaadin/vaadin-themable-mixin": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.3.tgz", - "integrity": "sha512-xA+p9lfzUWT+Dd0R8CM+bFBI5qqZFbPL5ZjJ3POx3qd9DGgByG+tUvJlkRCEEDykh9SY6knqh0TbRUqOY3ws5A==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.4.tgz", + "integrity": "sha512-b91SHVU+E7pWnpJooLDOEyqpGfPVOj+L8wTEpL3GJh/ASi0htenslOtqDodpDiAEpVs4gRlo3ZJRtMzQZ7KsGA==", "dependencies": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "^2.0.0" @@ -2942,18 +3070,6 @@ "node": ">=12.0.0" } }, - "node_modules/@web/polyfills-loader/node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/@web/polyfills-loader/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -3005,18 +3121,6 @@ "node": ">=12.0.0" } }, - "node_modules/@web/rollup-plugin-html/node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/@web/rollup-plugin-html/node_modules/clean-css": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.0.tgz", @@ -3165,9 +3269,9 @@ } }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3272,13 +3376,10 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/aria-query": { "version": "4.2.2", @@ -3390,12 +3491,12 @@ } }, "node_modules/axe-core": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", - "integrity": "sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz", + "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==", "dev": true, "engines": { - "node": ">=12" + "node": ">=4" } }, "node_modules/axobject-query": { @@ -4069,9 +4170,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.23.3", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.23.3.tgz", - "integrity": "sha512-XpoouuqIj4P+GWtdyV8ZO3/u4KftkeDVMfvp+308eGMhCrA3lVDSmAxO0c6GGOcmgVlaKDrgWVMo49h2ab/TDA==", + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.24.1.tgz", + "integrity": "sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg==", "dev": true, "hasInstallScript": true, "funding": { @@ -4614,49 +4715,48 @@ } }, "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.3", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -4664,28 +4764,29 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "dependencies": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "engines": { - "node": ">= 6" + "node": "^10.12.0 || >=12.0.0" }, "peerDependencies": { - "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", - "eslint-plugin-import": "^2.22.1" + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" } }, "node_modules/eslint-config-prettier": { @@ -4720,16 +4821,20 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", - "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dev": true, "dependencies": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -4822,9 +4927,9 @@ } }, "node_modules/eslint-plugin-lit-a11y": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-1.1.0.tgz", - "integrity": "sha512-reJqT0UG/Y8OC2z7pfgm0ODK1D6o5TgQpGdlgN1ja0HjdREXLqFVoYiEv013oNx3kBhTUaLlic64rRNw+386xw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-2.2.2.tgz", + "integrity": "sha512-9dJfnwPOOA6x7Ow/+GFoOt1hr4mSNrF6KBWQ2OFFAY/9aBYtyBX4fRbpxqS2y3ld66/bjWru2+LGWgNVr5GxzQ==", "dev": true, "dependencies": { "aria-query": "^4.2.2", @@ -4832,9 +4937,9 @@ "axobject-query": "^2.2.0", "dom5": "^3.0.1", "emoji-regex": "^9.2.0", - "eslint": "^7.6.0", + "eslint-plugin-lit": "^1.6.0", "eslint-rule-extender": "0.0.1", - "intl-list-format": "^1.0.3", + "language-tags": "^1.0.5", "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.1", "requireindex": "~1.2.0" @@ -4871,16 +4976,6 @@ "eslint": ">=5" } }, - "node_modules/eslint-rule-composer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", - "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/eslint-rule-extender": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/eslint-rule-extender/-/eslint-rule-extender-0.0.1.tgz", @@ -4894,41 +4989,22 @@ "url": "https://github.com/sponsors/kaicataldo" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^2.0.0" }, "engines": { - "node": ">=6" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" + }, + "peerDependencies": { + "eslint": ">=5" } }, "node_modules/eslint-visitor-keys": { @@ -4940,15 +5016,6 @@ "node": ">=10" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5010,6 +5077,65 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/eslint/node_modules/globals": { "version": "13.16.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", @@ -5034,31 +5160,58 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/lru-cache": { + "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "p-locate": "^5.0.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/eslint/node_modules/supports-color": { @@ -5085,46 +5238,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", "dev": true, "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { - "node": ">=4" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/esquery": { @@ -5169,15 +5306,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", @@ -5363,18 +5491,6 @@ "node": ">=4.0.0" } }, - "node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/find-versions": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", @@ -5659,15 +5775,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/got": { "version": "10.7.0", "resolved": "https://registry.npmjs.org/got/-/got-10.7.0.tgz", @@ -5727,6 +5834,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/grid-index": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz", @@ -6053,9 +6166,9 @@ ] }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -6130,15 +6243,6 @@ "integrity": "sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==", "dev": true }, - "node_modules/intl-list-format": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/intl-list-format/-/intl-list-format-1.0.3.tgz", - "integrity": "sha512-VNF1Mh0K1xALXkz/5QsK1gfKRvEQO/jWaniTGAzQvbzGr5uyGDskQrRjnf6Qnbc9/JRbNE8BQtTg6iWuFrZorw==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/ip": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", @@ -6663,13 +6767,12 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -6894,6 +6997,21 @@ "ms": "^2.1.1" } }, + "node_modules/language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "dev": true + }, + "node_modules/language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "dev": true, + "dependencies": { + "language-subtag-registry": "~0.3.2" + } + }, "node_modules/leaflet": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.8.0.tgz", @@ -7096,19 +7214,6 @@ "@types/trusted-types": "^2.0.2" } }, - "node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -7138,12 +7243,6 @@ "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "dev": true }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -7847,30 +7946,6 @@ "node": ">=4" } }, - "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -7897,15 +7972,6 @@ "node": ">=8" } }, - "node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -7985,15 +8051,6 @@ "tslib": "^2.0.3" } }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -8255,15 +8312,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/protocol-buffers-schema": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", @@ -8781,18 +8829,6 @@ "rollup": "^2.0.0" } }, - "node_modules/rollup-plugin-terser/node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/rollup-plugin-terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -9091,12 +9127,6 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -9308,22 +9338,6 @@ "integrity": "sha512-hqTN6kW+pN6/qro6G9OZ7ceDQOcYno020zBQKpZQLsJhYTDMCMNfXi/Y8duF5iW+4WWZr42ry0MMkcRGpbwG2A==", "dev": true }, - "node_modules/table": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", - "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -9357,78 +9371,6 @@ "node": ">=8" } }, - "node_modules/table/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/table/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/table/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/table/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -10389,28 +10331,6 @@ "semver": "^6.3.0" } }, - "@babel/eslint-parser": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.18.2.tgz", - "integrity": "sha512-oFQYkE8SuH14+uR51JVAmdqwKYXGRjEXx7s+WiagVjqQ+HPE+nnwyF2qlVG8evUsUHmPcA+6YXMEDbIhEyQc5A==", - "dev": true, - "peer": true, - "requires": { - "eslint-scope": "^5.1.1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.0" - } - }, - "@babel/eslint-plugin": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-7.17.7.tgz", - "integrity": "sha512-JATUoJJXSgwI0T8juxWYtK1JSgoLpIGUsCHIv+NMXcUDA2vIe6nvAHR9vnuJgs/P1hOFw7vPwibixzfqBBLIVw==", - "dev": true, - "peer": true, - "requires": { - "eslint-rule-composer": "^0.3.0" - } - }, "@babel/generator": { "version": "7.18.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", @@ -11451,9 +11371,9 @@ } }, "@babel/runtime-corejs3": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz", - "integrity": "sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz", + "integrity": "sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A==", "dev": true, "requires": { "core-js-pure": "^3.20.2", @@ -11516,26 +11436,26 @@ } }, "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.15.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { "globals": { - "version": "13.16.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", - "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -11550,16 +11470,22 @@ } }, "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" } }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -11866,17 +11792,16 @@ "integrity": "sha512-ukowSvzpZQDUH0Y3znJTsY88HkiGk3Khc0WGpIPhap1xlerieYi27QBg6wx/nTurpWfU6XXXsx9ocxDYCdtw0Q==" }, "@open-wc/eslint-config": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@open-wc/eslint-config/-/eslint-config-4.3.0.tgz", - "integrity": "sha512-kCxFWQ1AR4meTmWJGnK36LJYqDJeFGjlj6n4vLjAW3/c1VUyYQKL90vrNKy/OHS9kTjc9dcH5D64myAbNx6r1w==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@open-wc/eslint-config/-/eslint-config-8.0.2.tgz", + "integrity": "sha512-ymOFXtsAXv1tkpW48touNZVGfV6X/ii/Ir+IZfFQi3KicJ/HF5wqK1x8Un4ZZzXravGqPqGfXCycKeyJf8s+pg==", "dev": true, "requires": { - "eslint": "^7.6.0", - "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-html": "^6.0.0", - "eslint-plugin-import": "^2.18.2", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-lit": "^1.2.0", - "eslint-plugin-lit-a11y": "^1.0.1", + "eslint-plugin-lit-a11y": "^2.2.2", "eslint-plugin-no-only-tests": "^2.4.0", "eslint-plugin-wc": "^1.2.0" } @@ -12262,10 +12187,36 @@ "@types/node": "*" } }, - "@vaadin/component-base": { + "@vaadin/app-layout": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.3.tgz", - "integrity": "sha512-+RBptC6XS6qbsEBouYuqPby4MwOGgLMjAP0eE+yifr29GZm8Pvfnz7703c9IXp2DdcvCBaNDNvPnsAdEpaAl9A==", + "resolved": "https://registry.npmjs.org/@vaadin/app-layout/-/app-layout-23.1.3.tgz", + "integrity": "sha512-/v8MX2XrHdxNuCbqUH6ytMzd/DXXE1tF1/1kvKNiQonrMw/0NyCid8A3mA+kqx1f4nx1gKamyKDvHcfqQjEWoQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.3", + "@vaadin/component-base": "^23.1.3", + "@vaadin/vaadin-lumo-styles": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "@vaadin/button": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/button/-/button-23.1.4.tgz", + "integrity": "sha512-RIKl5wdLXfXAgh/6Ld2Goiww5uLR0QLB+In7fWKZmLaK6xByAhsoYeJCjdKjBCA3VwypvWpyy4M2LPdzKjAnzw==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/component-base": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/component-base/-/component-base-23.1.4.tgz", + "integrity": "sha512-qlMY0j2WWuEtVa/XN3yXVPmkrRP6JZ4SqXDpfrOXXmmXPouGPtBkLJ6qskabUyO9BO/pKgiOpVlmWbceu5L5/A==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", @@ -12274,26 +12225,65 @@ "lit": "^2.0.0" } }, - "@vaadin/field-base": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.3.tgz", - "integrity": "sha512-rLO6JZj/H/5TtPMLho9U7NmlIHvBe4AtwlEqyjonX7DPw/ThSa2rtt3RKn8CKWTw8Zzgyx00q42CjNsSq2BjPA==", + "@vaadin/dialog": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/dialog/-/dialog-23.1.4.tgz", + "integrity": "sha512-/gtSq/b7HaVTqpQBhgHW2qxMxH0VhwnUGuy1ykYYsd40y+A6leVHSzs3I37gsBbyXThw39dAvpq+uE/PLJf5Xg==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", - "@vaadin/component-base": "^23.1.3", + "@vaadin/component-base": "^23.1.4", + "@vaadin/lit-renderer": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-overlay": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/field-base": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/field-base/-/field-base-23.1.4.tgz", + "integrity": "sha512-lRJIyKcAKUPj5VIKWy0jyVZuUxWsBETiOEdBc4yQZVlSPCIdSu+LXUUIUychbzRlF8fDFxk/NRIaH/IYG4McCg==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", "lit": "^2.0.0" } }, - "@vaadin/icon": { + "@vaadin/form-layout": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/form-layout/-/form-layout-23.1.4.tgz", + "integrity": "sha512-jlITymNzINZqCW9tV1rC2TdE38GmCWkbi54J2wkNWtfAlhrASOQhyL0iBnfmOPbL87c5J8LSAfGGblNThTFEEA==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/horizontal-layout": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.3.tgz", - "integrity": "sha512-0rMRYKBlHw5T4WNYFYnVX7eLXevsSNhApfzFWr3T1BVVajSBECVe7eCt+jClibhAAbcNzYhAs8SC/rwY17AcOg==", + "resolved": "https://registry.npmjs.org/@vaadin/horizontal-layout/-/horizontal-layout-23.1.3.tgz", + "integrity": "sha512-dhOAlG0oI0UZXwfDLWJZ7D5T8hFxTNnAplJA0BJ52f42HYzgNLuC8nfokfW81gOI/iIVY+d//IU0JFRfKoJTFA==", "requires": { "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3", + "@vaadin/vaadin-material-styles": "^23.1.3", + "@vaadin/vaadin-themable-mixin": "^23.1.3" + } + }, + "@vaadin/icon": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/icon/-/icon-23.1.4.tgz", + "integrity": "sha512-Av8vfElbKCU3alMlkDtofOccG9V3j9sOhqnPQ39HPfo+omAh1Ee6afXr67Qi7KayhpL4uD6po0PMbof1Xz3Qpw==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4", "lit": "^2.0.0" } }, @@ -12309,10 +12299,23 @@ } }, "@vaadin/input-container": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.3.tgz", - "integrity": "sha512-+PFd8bWbnVy89HmYNc/uvUV4KuxOvFYBBrsmnpKKW5Tc5wzCMa6vCXEyyDxuiVOkFnHU24P7kBSyqia7HHjaTg==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/input-container/-/input-container-23.1.4.tgz", + "integrity": "sha512-+C7W/C/pFBFcuLONtPvvJmzXvEI/6YYID9VwpOIigDEvAVI0beJTiM6meHxfUMfxMHwvcUd5Y8hY2r/LOOnXyA==", "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/item": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@vaadin/item/-/item-23.1.3.tgz", + "integrity": "sha512-jQsS8bhDMgMq3mfEjvGvnbQC9d3BL9R9+U3fKwkxPa6k8ASaYwtrRGIl3F+oRippAIBf/bDflfC09KjHEDAezA==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", @@ -12320,50 +12323,119 @@ "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, - "@vaadin/text-field": { + "@vaadin/lit-renderer": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/lit-renderer/-/lit-renderer-23.1.4.tgz", + "integrity": "sha512-XkF3t/Ya0NK/+2IyXe/iAS2FPkq/v64J70pkB8mneqUncEceitzQW/ODlf3wXx0wwxniPrsOUvYicD3Lhwu4qQ==", + "requires": { + "lit": "^2.0.0" + } + }, + "@vaadin/password-field": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/password-field/-/password-field-23.1.4.tgz", + "integrity": "sha512-PkTarFwvLEkLMRsz4niJTDsf+lVmWXfm6UHIE69vbU5s63NUFolEOEyuq8JWYcDICKtvBYQ8uDH4zzpv3N5vmQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/button": "^23.1.4", + "@vaadin/text-field": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4" + } + }, + "@vaadin/progress-bar": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/progress-bar/-/progress-bar-23.1.4.tgz", + "integrity": "sha512-GSCgUE0Kuv2+yxS/W0zxX7H6IEaGeFbwwHjV/GCopnrVLVv1DucfyAa0vSqmBucs+0Nu25Cx893V+BNL/dqmmw==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/tabs": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.3.tgz", - "integrity": "sha512-oYxJDo5AU+lE+vqY7otvYqnSoXf233/iJKISLF4C/d5pofx/GvnDx2/dSopvJ2OSp1S1mn/CaVPazjBeXY7eLg==", + "resolved": "https://registry.npmjs.org/@vaadin/tabs/-/tabs-23.1.3.tgz", + "integrity": "sha512-5qY3IcNpct7oTLOPB163Ca2WW5AjHEdKlerhS5QdQtVWYurJZHVfy/tgx+pqo/xflBZsPZKLH/LFd4m4OklnGg==", "requires": { "@polymer/polymer": "^3.0.0", "@vaadin/component-base": "^23.1.3", - "@vaadin/field-base": "^23.1.3", - "@vaadin/input-container": "^23.1.3", + "@vaadin/item": "^23.1.3", + "@vaadin/vaadin-list-mixin": "^23.1.3", "@vaadin/vaadin-lumo-styles": "^23.1.3", "@vaadin/vaadin-material-styles": "^23.1.3", "@vaadin/vaadin-themable-mixin": "^23.1.3" } }, + "@vaadin/text-field": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/text-field/-/text-field-23.1.4.tgz", + "integrity": "sha512-pMaPR0KLaXb6PB3lscf7jJKRvUnGdB18oOmJKxiYO1vA0q6U8hUbeZ4ba2vGUl+m7hA6t6DbkTB4SBQdRq3tnQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/field-base": "^23.1.4", + "@vaadin/input-container": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, "@vaadin/vaadin-development-mode-detector": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@vaadin/vaadin-development-mode-detector/-/vaadin-development-mode-detector-2.0.5.tgz", "integrity": "sha512-miirBQw10UHjKwRv29iZniXCo41cLg3wFotoyTeUZ2PTGIDk/fZVFr4Q4WVKZrp3D15878vz94nNQROSmPLjdg==" }, - "@vaadin/vaadin-lumo-styles": { + "@vaadin/vaadin-list-mixin": { "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.3.tgz", - "integrity": "sha512-edfO/By6M8s5tblxj7ze8x2CMgGr0O9ZKPeHatrl+yk1dNZLXKdgCbhZQdQxRrx7GiyVBkim7wDNBkpkWSpdZQ==", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-list-mixin/-/vaadin-list-mixin-23.1.3.tgz", + "integrity": "sha512-PpxHMUY0TSiVCwoxVSgBP1BVApfyEmXaBDgreeJ5Bt7ma+OMf35yrZDNwPqQPNs4cvAfADhDT7DhpWsqkHodOg==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.3" + } + }, + "@vaadin/vaadin-lumo-styles": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-lumo-styles/-/vaadin-lumo-styles-23.1.4.tgz", + "integrity": "sha512-zZRpMRJ2xjDAX8FhnhclJIo1l+kySGcyJ+SaFVAa2nB85sC1JWdELmZGwSpCS+ZH1ss6lTp3XY5fniRuPO98WQ==", "requires": { "@polymer/iron-icon": "^3.0.0", "@polymer/iron-iconset-svg": "^3.0.0", "@polymer/polymer": "^3.0.0", - "@vaadin/icon": "^23.1.3", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/icon": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/vaadin-material-styles": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.3.tgz", - "integrity": "sha512-VPqa/ZxYa8t7tsxCkK+r/SedU413NDexBmDGmnLhn+zGHaL0qgbXQP/te7p8YCHhyEj/bOxwcgyNTFuPNeQb1w==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-material-styles/-/vaadin-material-styles-23.1.4.tgz", + "integrity": "sha512-GLIMrFbK/jBFg+6LZI3XkVBKqGSzmf/Cd2rIU2+BcpMnOtUNXxe5Ip4WaPgzIJRemSNy1M1eS0GNimSiAS618w==", "requires": { "@polymer/polymer": "^3.0.0", - "@vaadin/vaadin-themable-mixin": "^23.1.3" + "@vaadin/vaadin-themable-mixin": "^23.1.4" + } + }, + "@vaadin/vaadin-overlay": { + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-overlay/-/vaadin-overlay-23.1.4.tgz", + "integrity": "sha512-RvwgdfSDwYDn63fVVm3jrDcWbR47XX2wMon8lJSc+TQ5C43cDCpyhrjHFzR4BU/LJXCIlZ878wUrJYFZKI5QgQ==", + "requires": { + "@polymer/polymer": "^3.0.0", + "@vaadin/component-base": "^23.1.4", + "@vaadin/vaadin-lumo-styles": "^23.1.4", + "@vaadin/vaadin-material-styles": "^23.1.4", + "@vaadin/vaadin-themable-mixin": "^23.1.4" } }, "@vaadin/vaadin-themable-mixin": { - "version": "23.1.3", - "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.3.tgz", - "integrity": "sha512-xA+p9lfzUWT+Dd0R8CM+bFBI5qqZFbPL5ZjJ3POx3qd9DGgByG+tUvJlkRCEEDykh9SY6knqh0TbRUqOY3ws5A==", + "version": "23.1.4", + "resolved": "https://registry.npmjs.org/@vaadin/vaadin-themable-mixin/-/vaadin-themable-mixin-23.1.4.tgz", + "integrity": "sha512-b91SHVU+E7pWnpJooLDOEyqpGfPVOj+L8wTEpL3GJh/ASi0htenslOtqDodpDiAEpVs4gRlo3ZJRtMzQZ7KsGA==", "requires": { "@open-wc/dedupe-mixin": "^1.3.0", "lit": "^2.0.0" @@ -12573,12 +12645,6 @@ "whatwg-fetch": "^3.5.0" }, "dependencies": { - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -12623,12 +12689,6 @@ "parse5": "^6.0.1" }, "dependencies": { - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true - }, "clean-css": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.0.tgz", @@ -12753,9 +12813,9 @@ } }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true }, "acorn-jsx": { @@ -12827,13 +12887,10 @@ } }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "aria-query": { "version": "4.2.2", @@ -12915,9 +12972,9 @@ "dev": true }, "axe-core": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", - "integrity": "sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz", + "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==", "dev": true }, "axobject-query": { @@ -13416,9 +13473,9 @@ } }, "core-js-pure": { - "version": "3.23.3", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.23.3.tgz", - "integrity": "sha512-XpoouuqIj4P+GWtdyV8ZO3/u4KftkeDVMfvp+308eGMhCrA3lVDSmAxO0c6GGOcmgVlaKDrgWVMo49h2ab/TDA==", + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.24.1.tgz", + "integrity": "sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg==", "dev": true }, "cosmiconfig": { @@ -13842,62 +13899,52 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.3.0", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.3", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", + "glob-parent": "^6.0.1", + "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -13938,6 +13985,47 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "globals": { "version": "13.16.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", @@ -13953,24 +14041,39 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "lru-cache": { + "locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "yallist": "^4.0.0" + "p-locate": "^5.0.0" } }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "yocto-queue": "^0.1.0" } }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -13985,24 +14088,19 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "requires": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" } }, "eslint-config-prettier": { @@ -14034,13 +14132,12 @@ } }, "eslint-module-utils": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", - "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dev": true, "requires": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "dependencies": { "debug": { @@ -14130,9 +14227,9 @@ } }, "eslint-plugin-lit-a11y": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-1.1.0.tgz", - "integrity": "sha512-reJqT0UG/Y8OC2z7pfgm0ODK1D6o5TgQpGdlgN1ja0HjdREXLqFVoYiEv013oNx3kBhTUaLlic64rRNw+386xw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-2.2.2.tgz", + "integrity": "sha512-9dJfnwPOOA6x7Ow/+GFoOt1hr4mSNrF6KBWQ2OFFAY/9aBYtyBX4fRbpxqS2y3ld66/bjWru2+LGWgNVr5GxzQ==", "dev": true, "requires": { "aria-query": "^4.2.2", @@ -14140,9 +14237,9 @@ "axobject-query": "^2.2.0", "dom5": "^3.0.1", "emoji-regex": "^9.2.0", - "eslint": "^7.6.0", + "eslint-plugin-lit": "^1.6.0", "eslint-rule-extender": "0.0.1", - "intl-list-format": "^1.0.3", + "language-tags": "^1.0.5", "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.1", "requireindex": "~1.2.0" @@ -14164,44 +14261,19 @@ "js-levenshtein-esm": "^1.2.0" } }, - "eslint-rule-composer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", - "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", - "dev": true, - "peer": true - }, "eslint-rule-extender": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/eslint-rule-extender/-/eslint-rule-extender-0.0.1.tgz", "integrity": "sha512-F0j1Twve3lamL3J0rRSVAynlp58sDPG39JFcQrM+u9Na7PmCgiPHNODh6YE9mduaGcsn3NBqbf6LZRj0cLr8Ng==", "dev": true }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "eslint-visitor-keys": "^2.0.0" } }, "eslint-visitor-keys": { @@ -14211,30 +14283,24 @@ "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", "dev": true, "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true } } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", @@ -14269,12 +14335,6 @@ } } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, "estree-walker": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", @@ -14428,15 +14488,6 @@ "array-back": "^3.0.1" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, "find-versions": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", @@ -14632,14 +14683,6 @@ "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - } } }, "got": { @@ -14685,6 +14728,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "grid-index": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz", @@ -14910,9 +14959,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "import-fresh": { @@ -14969,12 +15018,6 @@ "integrity": "sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==", "dev": true }, - "intl-list-format": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/intl-list-format/-/intl-list-format-1.0.3.tgz", - "integrity": "sha512-VNF1Mh0K1xALXkz/5QsK1gfKRvEQO/jWaniTGAzQvbzGr5uyGDskQrRjnf6Qnbc9/JRbNE8BQtTg6iWuFrZorw==", - "dev": true - }, "ip": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", @@ -15344,13 +15387,12 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "jsesc": { @@ -15536,6 +15578,21 @@ } } }, + "language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "dev": true + }, + "language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "dev": true, + "requires": { + "language-subtag-registry": "~0.3.2" + } + }, "leaflet": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.8.0.tgz", @@ -15692,16 +15749,6 @@ "@types/trusted-types": "^2.0.2" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -15731,12 +15778,6 @@ "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "dev": true }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -16261,24 +16302,6 @@ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==" }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, "p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -16296,12 +16319,6 @@ "p-finally": "^1.0.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true - }, "param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -16371,12 +16388,6 @@ "tslib": "^2.0.3" } }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -16572,12 +16583,6 @@ "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "protocol-buffers-schema": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", @@ -16965,12 +16970,6 @@ "terser": "^5.0.0" }, "dependencies": { - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -17213,12 +17212,6 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -17381,74 +17374,6 @@ "integrity": "sha512-hqTN6kW+pN6/qro6G9OZ7ceDQOcYno020zBQKpZQLsJhYTDMCMNfXi/Y8duF5iW+4WWZr42ry0MMkcRGpbwG2A==", "dev": true }, - "table": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", - "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - } - } - }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", diff --git a/src/main/js/pluckr-app/package.json b/src/main/js/pluckr-app/package.json index 24b66a0..37b9b32 100644 --- a/src/main/js/pluckr-app/package.json +++ b/src/main/js/pluckr-app/package.json @@ -15,9 +15,17 @@ }, "dependencies": { "@mapbox/mapbox-gl-geocoder": "^5.0.1", + "@vaadin/app-layout": "^23.1.3", + "@vaadin/button": "^23.1.3", + "@vaadin/dialog": "^23.1.4", + "@vaadin/form-layout": "^23.1.4", + "@vaadin/horizontal-layout": "^23.1.3", "@vaadin/icon": "^23.1.3", "@vaadin/icons": "^23.1.3", - "@vaadin/text-field": "^23.1.3", + "@vaadin/password-field": "^23.1.4", + "@vaadin/progress-bar": "^23.1.4", + "@vaadin/tabs": "^23.1.3", + "@vaadin/text-field": "^23.1.4", "leaflet": "^1.8.0", "leaflet-geosearch": "jlengrand/leaflet-geosearch#update", "lit": "^2.0.2", @@ -27,7 +35,7 @@ "@babel/preset-env": "^7.16.4", "@custom-elements-manifest/analyzer": "^0.4.17", "@open-wc/building-rollup": "^2.0.1", - "@open-wc/eslint-config": "^4.3.0", + "@open-wc/eslint-config": "^8.0.2", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-node-resolve": "^13.0.6", @@ -36,23 +44,17 @@ "@web/rollup-plugin-import-meta-assets": "^1.0.7", "babel-plugin-template-html-minifier": "^4.1.0", "deepmerge": "^4.2.2", - "eslint": "^7.32.0", + "eslint": "^8.22.0", "eslint-config-prettier": "^8.3.0", "husky": "^4.3.8", "koa-proxies": "^0.12.2", "lint-staged": "^10.5.4", - "prettier": "^2.4.1", + "prettier": "^2.7.1", "rimraf": "^3.0.2", "rollup": "^2.60.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-workbox": "^6.2.0" }, - "eslintConfig": { - "extends": [ - "@open-wc", - "prettier" - ] - }, "prettier": { "singleQuote": true, "arrowParens": "avoid" diff --git a/src/main/js/pluckr-app/src/PluckrApp.js b/src/main/js/pluckr-app/src/PluckrApp.js index 88f16f3..24239cf 100644 --- a/src/main/js/pluckr-app/src/PluckrApp.js +++ b/src/main/js/pluckr-app/src/PluckrApp.js @@ -1,8 +1,15 @@ import { LitElement, html, css } from 'lit'; +import './pluckr-login.js'; + import '@vaadin/text-field'; import '@vaadin/icons'; -import mapbox from '../dist/mapbox-gl.esm.js' -import MapboxGeocoder from '../dist/mapbox-gl-geocoder.esm.min.js' +import '@vaadin/app-layout'; +import '@vaadin/app-layout/vaadin-drawer-toggle.js'; +import '@vaadin/tabs'; +import '@vaadin/button'; + +import mapboxgl from '../dist/mapbox-gl.esm.js'; +import MapboxGeocoder from '../dist/mapbox-gl-geocoder.esm.min.js'; export class PluckrApp extends LitElement { map = null; @@ -10,7 +17,7 @@ export class PluckrApp extends LitElement { static get properties() { return { title: { type: String }, - location: {type: Object}, + location: { type: Object }, }; } @@ -38,30 +45,36 @@ export class PluckrApp extends LitElement { height: 1096px; width: 1096px; } + + pluckr-login { + margin-left: auto; + } `; } constructor() { super(); - this.title = 'My app'; - this.location = { x: 52.0474828687443, y: 5.080036739440433}; + this.title = 'Pluckr'; + this.location = { x: 52.0474828687443, y: 5.080036739440433 }; } firstUpdated(_changedProperties) { super.firstUpdated(_changedProperties); - this.map = new mapbox.Map({ - accessToken: 'pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ', + this.map = new mapboxgl.Map({ + accessToken: + 'pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ', container: this.renderRoot.querySelector('#map'), style: 'mapbox://styles/mapbox/streets-v11', center: [this.location.y, this.location.x], - zoom: 13 + zoom: 13, }); this.map.addControl( new MapboxGeocoder({ - accessToken: 'pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ', - mapboxgl: mapbox + accessToken: + 'pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ', + mapboxgl, }) ); @@ -70,19 +83,19 @@ export class PluckrApp extends LitElement { this.loadMarkers(this.map.getBounds()); } - loadMarkers(bounds){ - fetch(`/api/trees?bbox=${bounds._ne.lat},${bounds._ne.lng},${bounds._sw.lat},${bounds._sw.lng}`) + loadMarkers(bounds) { + fetch( + `/api/trees?bbox=${bounds._ne.lat},${bounds._ne.lng},${bounds._sw.lat},${bounds._sw.lng}` + ) .then(response => response.json()) .then(data => { - console.log('Loaded POIs', data); data.map(p => - new mapbox.Marker() + new mapboxgl.Marker() .setLngLat([p.location.y, p.location.x]) .addTo(this.map) ); - }) - .catch((error) => { + .catch(error => { console.error('Impossible to log Points of Interests:', error); }); } @@ -99,15 +112,27 @@ export class PluckrApp extends LitElement { integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" crossorigin="" /> - - - - ${this.title} - - - - - + + + + + + ${this.title} + + + + + + + + `; } } diff --git a/src/main/js/pluckr-app/src/PluckrLogin.js b/src/main/js/pluckr-app/src/PluckrLogin.js new file mode 100644 index 0000000..4222e09 --- /dev/null +++ b/src/main/js/pluckr-app/src/PluckrLogin.js @@ -0,0 +1,272 @@ +import { css, html, LitElement } from 'lit'; +import '@vaadin/horizontal-layout'; +import '@vaadin/button'; +import '@vaadin/dialog'; +import '@vaadin/form-layout'; +import '@vaadin/text-field'; +import '@vaadin/password-field'; +import { dialogRenderer } from '@vaadin/dialog/lit'; +import '@vaadin/progress-bar'; + +export class PluckrLogin extends LitElement { + responsiveSteps = [{ minWidth: 0, columns: 1 }]; + + static get properties() { + return { + signUpOpened: { type: Boolean }, + logInOpened: { type: Boolean }, + username: { type: String }, + password: { type: String }, + passwordConfirm: { type: String }, + loadingBarActive: { type: Boolean }, + errorMessage: { type: String }, + }; + } + + static get styles() { + return css``; + } + + constructor() { + super(); + this.signUpOpened = false; + this.logInOpened = false; + this.loadingBarActive = false; + } + + render() { + return html` + + Sign up + Login + + + { + this.signUpOpened = e.detail.value; + }}" + ${dialogRenderer(this.signUpRenderer, [ + this.username, + this.signUpOpened, + this.password, + this.loadingBarActive, + this.errorMessage, + ])} + id="signUp" + > + + + { + this.logInOpened = e.detail.value; + }}" + ${dialogRenderer(this.logInRenderer, [ + this.username, + this.logInOpened, + this.password, + this.loadingBarActive, + this.errorMessage, + ])} + id="logIn" + > + + `; + } + + signUpClicked() { + this.signUpOpened = true; + } + + logInClicked() { + this.logInOpened = true; + } + + logInRenderer() { + return html` + + { + this.username = e.target.value; + }}" + label="email" + > + { + this.password = e.target.value; + }}" + label="Password" + > + + ${this.loadingBarActive + ? html`` + : undefined} + ${this.errorMessage + ? html`${this.errorMessage}` + : undefined} + + + { + this.logInOpened = false; + }}" + >Cancel + LogIn + + + `; + } + + signUpRenderer() { + return html` + + { + this.username = e.target.value; + }}" + label="email" + > + { + this.password = e.target.value; + }}" + label="Password" + > + { + this.passwordConfirm = e.target.value; + }}" + label="Confirm password" + > + + ${this.loadingBarActive + ? html`` + : undefined} + ${this.errorMessage + ? html`${this.errorMessage}` + : undefined} + + + { + this.signUpOpened = false; + }}" + >Cancel + + Sign up + + + `; + } + + logIn() { + this.loadingBarActive = true; + + fetch('/api/login', { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: new URLSearchParams({ + username: this.username, + password: this.password, + }), + }) + .then(response => { + this.loadingBarActive = false; + if (!response.ok) { + this.errorMessage = response.statusText; + console.error( + 'There has been a problem logging in the user:', + response.statusText + ); + } else { + this.username = null; + this.password = null; + this.passwordConfirm = null; + this.logInOpened = false; + } + }) + .catch(error => { + this.errorMessage = + 'There has been an issue contacting the server. Please try again later'; + console.error( + 'There has been a problem with your fetch operation:', + error + ); + this.username = null; + this.password = null; + this.passwordConfirm = null; + }); + } + + signUp() { + this.loadingBarActive = true; + + fetch('/api/signup', { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: new URLSearchParams({ + username: this.username, + password: this.password, + }), + }) + .then(response => { + this.loadingBarActive = false; + if (!response.ok) { + this.errorMessage = response.statusText; + console.error( + 'There has been a problem saving the user:', + response.statusText + ); + } else { + this.username = null; + this.password = null; + this.passwordConfirm = null; + this.signUpOpened = false; + } + }) + .catch(error => { + this.errorMessage = + 'There has been an issue contacting the server. Please try again later'; + // eslint-disable-next-line no-console + console.error( + 'There has been a problem with your fetch operation:', + error + ); + this.username = null; + this.password = null; + this.passwordConfirm = null; + }); + } +} diff --git a/src/main/js/pluckr-app/src/pluckr-login.js b/src/main/js/pluckr-app/src/pluckr-login.js new file mode 100644 index 0000000..62a11d2 --- /dev/null +++ b/src/main/js/pluckr-app/src/pluckr-login.js @@ -0,0 +1,3 @@ +import {PluckrLogin} from "./PluckrLogin.js"; + +customElements.define('pluckr-login', PluckrLogin); diff --git a/src/main/kotlin/nl/lengrand/pluckr/Application.kt b/src/main/kotlin/nl/lengrand/pluckr/Application.kt index 7ee1e57..c6ba48c 100644 --- a/src/main/kotlin/nl/lengrand/pluckr/Application.kt +++ b/src/main/kotlin/nl/lengrand/pluckr/Application.kt @@ -1,24 +1,58 @@ package nl.lengrand.pluckr +import UserSession import io.ktor.serialization.kotlinx.json.* import io.ktor.server.application.* +import io.ktor.server.auth.* import io.ktor.server.engine.* -import io.ktor.server.metrics.micrometer.* import io.ktor.server.netty.* import io.ktor.server.plugins.callloging.* import io.ktor.server.plugins.contentnegotiation.* -import io.ktor.server.plugins.cors.routing.* +import io.ktor.server.response.* +import io.ktor.server.sessions.* import kotlinx.serialization.json.Json -import net.postgis.jdbc.geometry.Point -import nl.lengrand.pluckr.plugins.* -import org.jetbrains.exposed.sql.* +import nl.lengrand.pluckr.plugins.configureRouting +import org.jetbrains.exposed.sql.Database +import org.jetbrains.exposed.sql.SchemaUtils +import org.jetbrains.exposed.sql.StdOutSqlLogger +import org.jetbrains.exposed.sql.addLogger import org.jetbrains.exposed.sql.transactions.transaction fun Application.myapp(){ val database = initDb() - install(CORS) + install(Sessions) { + cookie("user_session", SessionStorageMemory()) { + cookie.path = "/" + cookie.maxAgeInSeconds = 6000 + } + } + + install(Authentication) { + session("user_session") { + println("validating session!") + + + validate { session -> + if(session.name.isNotEmpty()) { + println("Valid!") + println(session) + session + } else { + println("Not valid!") + println(session) + null + } + } + challenge { + println("redirecting") + call.respondRedirect("/") + } + } + } + +// install(CORS) install(ContentNegotiation){ json(Json { prettyPrint = true @@ -27,7 +61,6 @@ fun Application.myapp(){ } install(CallLogging) // install(MicrometerMetrics) - configureRouting(database) } @@ -37,24 +70,7 @@ fun initDb(): Database { transaction { addLogger(StdOutSqlLogger) - - SchemaUtils.create(Trees) - -// val first = Tree.new { -// name = "Laurier" -// description = "un laurier accessible à tous" -// location = Point(52.04681865145196, 5.079779509938945) -// } - -// Trees.insert { -// it[name] = "Laurier 2" -// it[description] = "un laurier accessible à tous" -// it[location] = Point(52.04681865145196, 5.079779509938945) -// } - - -// println("Trees: ${Tree.all().joinToString {it.location.value}}") - + SchemaUtils.create(Trees, Users) } return database } diff --git a/src/main/kotlin/nl/lengrand/pluckr/Controller.kt b/src/main/kotlin/nl/lengrand/pluckr/Controller.kt deleted file mode 100644 index 77ae474..0000000 --- a/src/main/kotlin/nl/lengrand/pluckr/Controller.kt +++ /dev/null @@ -1,59 +0,0 @@ -import kotlinx.serialization.KSerializer -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable -import kotlinx.serialization.descriptors.SerialDescriptor -import kotlinx.serialization.encoding.Decoder -import kotlinx.serialization.encoding.Encoder -import net.postgis.jdbc.geometry.Point -import nl.lengrand.pluckr.Trees -import org.jetbrains.exposed.sql.Database -import org.jetbrains.exposed.sql.ResultRow -import org.jetbrains.exposed.sql.selectAll -import org.jetbrains.exposed.sql.transactions.transaction - -@Serializable -data class Tree( - val id: Int? = null, - val name: String, - val description: String?, - @Serializable(with = PointSerializer::class) - val location : Point -) - -@Serializable -@SerialName("Point") -private class PointSurrogate(val srid: Int, val x: Double, val y: Double) - -object PointSerializer : KSerializer { - override val descriptor: SerialDescriptor = PointSurrogate.serializer().descriptor - - override fun serialize(encoder: Encoder, value: Point) { - val surrogate = PointSurrogate(value.srid, value.x, value.y) - encoder.encodeSerializableValue(PointSurrogate.serializer(), surrogate) - } - - override fun deserialize(decoder: Decoder): Point { - val surrogate = decoder.decodeSerializableValue(PointSurrogate.serializer()) - return Point(surrogate.x, surrogate.y) - } -} - -private fun fromRow(it: ResultRow): Tree { - return Tree(it[Trees.id], it[Trees.name], it[Trees.description], it[Trees.location]) -} - -class Controller(private val database: Database) { - - fun getTrees() : ArrayList { - val trees : ArrayList = arrayListOf() - transaction(database){ - Trees.selectAll().map { trees.add(fromRow(it)) } - } - return trees - } - - fun getTrees(bbox: List?) : ArrayList { - println(bbox) - return getTrees() - } -} \ No newline at end of file diff --git a/src/main/kotlin/nl/lengrand/pluckr/Database.kt b/src/main/kotlin/nl/lengrand/pluckr/Database.kt index 2ab60b3..8c40d32 100644 --- a/src/main/kotlin/nl/lengrand/pluckr/Database.kt +++ b/src/main/kotlin/nl/lengrand/pluckr/Database.kt @@ -5,6 +5,8 @@ import net.postgis.jdbc.geometry.Point import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.ColumnType import org.jetbrains.exposed.sql.Table +import org.jetbrains.exposed.sql.javatime.datetime +import java.time.LocalDateTime object Trees : Table() { val id = integer("id").autoIncrement() @@ -15,6 +17,14 @@ object Trees : Table() { override val primaryKey = PrimaryKey(id) // name is optional here } +object Users: Table() { + val id = integer("id").autoIncrement() + val username = varchar("username", 100).uniqueIndex() + val password = varchar("password", 100) + val createdAt = datetime("created_at").clientDefault{ LocalDateTime.now() } + val updatedAt = datetime("updatedAt").clientDefault{ LocalDateTime.now() } +} + fun Table.point(name: String, srid: Int = 4326): Column = registerColumn(name, PointColumnType()) diff --git a/src/main/kotlin/nl/lengrand/pluckr/TreeController.kt b/src/main/kotlin/nl/lengrand/pluckr/TreeController.kt new file mode 100644 index 0000000..d44e9a3 --- /dev/null +++ b/src/main/kotlin/nl/lengrand/pluckr/TreeController.kt @@ -0,0 +1,106 @@ +import io.ktor.server.auth.* +import kotlinx.serialization.KSerializer +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder +import net.postgis.jdbc.geometry.Point +import nl.lengrand.pluckr.Trees +import org.jetbrains.exposed.sql.transactions.transaction +import kotlinx.datetime.LocalDateTime +import kotlinx.datetime.toKotlinLocalDateTime +import nl.lengrand.pluckr.Users +import org.jetbrains.exposed.sql.* +import org.mindrot.jbcrypt.BCrypt.* + +@Serializable +data class UserSession(val name: String) : Principal + +@Serializable +data class User( + val id: Int? = null, + val username: String, + val password: String, + val createdAt: LocalDateTime, + val updatedAt: LocalDateTime, +) + +@Serializable +data class Tree( + val id: Int? = null, + val name: String, + val description: String?, + @Serializable(with = PointSerializer::class) + val location : Point +) + +@Serializable +@SerialName("Point") +private class PointSurrogate(val srid: Int, val x: Double, val y: Double) + +object PointSerializer : KSerializer { + override val descriptor: SerialDescriptor = PointSurrogate.serializer().descriptor + + override fun serialize(encoder: Encoder, value: Point) { + val surrogate = PointSurrogate(value.srid, value.x, value.y) + encoder.encodeSerializableValue(PointSurrogate.serializer(), surrogate) + } + + override fun deserialize(decoder: Decoder): Point { + val surrogate = decoder.decodeSerializableValue(PointSurrogate.serializer()) + return Point(surrogate.x, surrogate.y) + } +} + +private fun ResultRow.toTree(): Tree { + return Tree(this[Trees.id], this[Trees.name], this[Trees.description], this[Trees.location]) +} + +private fun ResultRow.toUser(): User { + return User(this[Users.id], this[Users.username], this[Users.password], this[Users.createdAt].toKotlinLocalDateTime(), this[Users.updatedAt].toKotlinLocalDateTime()) +} + +class UserController(private val database: Database){ + fun createUser(email: String, zepassword: String) { + val salt = gensalt() + transaction(database) { + Users.insert { + it[username] = email + it[password] = hashpw(zepassword, salt); + } + } + } + + /* + Will throw NoSuchElementException if there are no results, or IllegalArgumentException if there are more than one + */ + private fun getUser(email: String): User { + val user = transaction(database) { + Users.select{ Users.username eq email}.single().toUser() + } + return user + } + + fun getUser(email: String, zepassword: String): User { + val user = getUser(email) + if (!checkpw(zepassword, user.password)) throw AuthenticationException("Incorrect password detected") + return user + } +} + +class TreeController(private val database: Database) { + fun getTrees() : ArrayList { + val trees : ArrayList = arrayListOf() + transaction(database){ + Trees.selectAll().map { trees.add(it.toTree()) } + } + return trees + } + + fun getTrees(bbox: List?) : ArrayList { + return getTrees() + } +} + +class AuthenticationException(message:String): Exception(message) diff --git a/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt b/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt index c5f9df9..c87cc9d 100644 --- a/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt +++ b/src/main/kotlin/nl/lengrand/pluckr/plugins/Routing.kt @@ -1,32 +1,78 @@ package nl.lengrand.pluckr.plugins -import Controller +import TreeController +import UserController +import UserSession +import io.ktor.http.* import io.ktor.server.routing.* import io.ktor.server.application.* +import io.ktor.server.auth.* import io.ktor.server.http.content.* +import io.ktor.server.request.* import io.ktor.server.response.* +import io.ktor.server.sessions.* +import org.jetbrains.exposed.exceptions.ExposedSQLException import org.jetbrains.exposed.sql.Database fun Application.configureRouting(database: Database) { - val controller = Controller(database) + val treeController = TreeController(database) + val userController = UserController(database) + routing { - get("/api/trees") { - println("IN HERE FIRST") - if(call.request.queryParameters["bbox"] != null){ - println("IN HERE") - val bbox = call.request.queryParameters["bbox"]?.split(",")?.map { it.toDouble() } - call.respond(controller.getTrees(bbox)) - } - else{ - call.respond(controller.getTrees()) + authenticate("user_session") { + get("/api/authenticated"){ + call.respondText("Hello, ${call.principal()?.name}!") } } + post("/api/login") { + val formParameters = call.receiveParameters() + try{ + val user = userController.getUser(formParameters["username"].toString(), formParameters["password"].toString()) + call.sessions.set(UserSession(user.username)) + call.respondRedirect("/") + } + catch(e: ExposedSQLException){ + call.response.status(HttpStatusCode(500, e.message!!)) + } + } - get("/hello") { + post("/api/logout") { + call.sessions.clear() + call.respondRedirect("/") + } + + post("/api/signup"){ + val formParameters = call.receiveParameters() + try{ + userController.createUser(formParameters["username"].toString(), formParameters["password"].toString()) + call.response.status(HttpStatusCode.OK) + } + catch(e: ExposedSQLException){ // TODO: Should I leak exceptions here? + val message = when (e.sqlState) { + "23505" -> + "User already exists" + else -> + "Unknown error, please retry later" + } + call.response.status(HttpStatusCode(500, message)) + } + } + + get("/api/trees") { + if(call.request.queryParameters["bbox"] != null){ + val bbox = call.request.queryParameters["bbox"]?.split(",")?.map { it.toDouble() } + call.respond(treeController.getTrees(bbox)) + } + else{ + call.respond(treeController.getTrees()) + } + } + + get("/api/hello") { call.respondText("Hello the World!") } diff --git a/src/main/resources/dist/2a2586f8.js b/src/main/resources/dist/2a2586f8.js deleted file mode 100644 index e13239f..0000000 --- a/src/main/resources/dist/2a2586f8.js +++ /dev/null @@ -1,28 +0,0 @@ -function t(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t} -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=n.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(i,t))}return t}toString(){return this.cssText}}const s=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new o(n,t,i)},r=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new o("string"==typeof t?t:t+"",void 0,i))(e)})(t):t -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;var a;const h=window.trustedTypes,l=h?h.emptyScript:"",u=window.reactiveElementPolyfillSupport,c={toAttribute(t,e){switch(e){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},d=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:d};class p extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),n=window.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=_){var n,o;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(null!==(o=null===(n=i.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==o?o:c.toAttribute)(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i,n;const o=this.constructor,s=o._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=o.getPropertyOptions(s),r=t.converter,a=null!==(n=null!==(i=null==r?void 0:r.fromAttribute)&&void 0!==i?i:"function"==typeof r?r:null)&&void 0!==n?n:c.fromAttribute;this._$El=s,this[s]=a(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||d)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var m;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:p}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.3.3");const f=globalThis.trustedTypes,g=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,y="?"+v,x=`<${y}>`,w=document,b=(t="")=>w.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,M=/>/g,E=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,C=/'/g,S=/"/g,k=/^(?:script|style|textarea|title)$/i,Z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),I=new WeakMap,R=w.createTreeWalker(w,129,null,!1),N=(t,e)=>{const i=t.length-1,n=[];let o,s=2===e?"":"",r=A;for(let e=0;e"===h[0]?(r=null!=o?o:A,l=-1):void 0===h[1]?l=-2:(l=r.lastIndex-h[2].length,a=h[1],r=void 0===h[3]?E:'"'===h[3]?S:C):r===S||r===C?r=E:r===z||r===M?r=A:(r=E,o=void 0);const c=r===E&&t[e+1].startsWith("/>")?" ":"";s+=r===A?i+x:l>=0?(n.push(a),i.slice(0,l)+"$lit$"+i.slice(l)+v+c):i+v+(-2===l?(n.push(void 0),e):c)}const a=s+(t[i]||">")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(a):a,n]};class ${constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,s=0;const r=t.length-1,a=this.parts,[h,l]=N(t,e);if(this.el=$.createElement(h,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=R.nextNode())&&a.length0){n.textContent=f?f.emptyScript:"";for(let i=0;i{var e;return T(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==B&&P(this._$AH)?this._$AA.nextSibling.data=t:this.k(w.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=$.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new H(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new $(t)),e}S(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new j(this.M(b()),this.M(b()),this,this.options)):i=e[n],i._$AI(o),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let s=!1;if(void 0===o)t=D(this,t,e,0),s=!P(t)||t!==this._$AH&&t!==O,s&&(this._$AH=t);else{const n=t;let r,a;for(t=o[0],r=0;r{var n,o;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let r=s._$litPart$;if(void 0===r){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;s._$litPart$=r=new j(e.insertBefore(b(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return O}}J.finalized=!0,J._$litElement$=!0,null===(Y=globalThis.litElementHydrateSupport)||void 0===Y||Y.call(globalThis,{LitElement:J});const Q=globalThis.litElementPolyfillSupport; -/* @preserve - * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */ -function tt(t){var e,i,n,o;for(i=1,n=arguments.length;i0?Math.floor(t):Math.ceil(t)};function zt(t,e,i){return t instanceof Tt?t:dt(t)?new Tt(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new Tt(t.x,t.y):new Tt(t,e,i)}function Mt(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=Et(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=Et(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=St(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=St(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,we=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",rt,e),window.removeEventListener("testPassiveEventSupport",rt,e)}catch(t){}return t}(),be=!!document.createElement("canvas").getContext,Pe=!(!document.createElementNS||!jt("svg").createSVGRect),Le=!!Pe&&((Wt=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI)),Te=!Pe&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Ae(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var ze={ie:Vt,ielt9:qt,edge:Gt,webkit:Kt,android:Yt,android23:Xt,androidStock:Qt,opera:te,chrome:ee,gecko:ie,safari:ne,phantom:oe,opera12:se,win:re,ie3d:ae,webkit3d:he,gecko3d:le,any3d:ue,mobile:ce,mobileWebkit:de,mobileWebkit3d:_e,msPointer:pe,pointer:me,touch:ge,touchNative:fe,mobileOpera:ve,mobileGecko:ye,retina:xe,passiveEvents:we,canvas:be,svg:Pe,vml:Te,inlineSvg:Le},Me=ze.msPointer?"MSPointerDown":"pointerdown",Ee=ze.msPointer?"MSPointerMove":"pointermove",Ce=ze.msPointer?"MSPointerUp":"pointerup",Se=ze.msPointer?"MSPointerCancel":"pointercancel",ke={touchstart:Me,touchmove:Ee,touchend:Ce,touchcancel:Se},Ze={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&zi(e);De(t,e)},touchmove:De,touchend:De,touchcancel:De},Oe={},Be=!1;function Ie(t,e,i){return"touchstart"===e&&(Be||(document.addEventListener(Me,Re,!0),document.addEventListener(Ee,Ne,!0),document.addEventListener(Ce,$e,!0),document.addEventListener(Se,$e,!0),Be=!0)),Ze[e]?(i=Ze[e].bind(this,i),t.addEventListener(ke[e],i,!1),i):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Re(t){Oe[t.pointerId]=t}function Ne(t){Oe[t.pointerId]&&(Oe[t.pointerId]=t)}function $e(t){delete Oe[t.pointerId]}function De(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Oe)e.touches.push(Oe[i]);e.changedTouches=[e],t(e)}}var He,je,Ue,We,Fe,Ve=ai(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),qe=ai(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ge="webkitTransition"===qe||"OTransition"===qe?qe+"End":"transitionend";function Ke(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function Ye(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function Xe(t){var e=t.parentNode;e&&e.removeChild(t)}function Je(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Qe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ti(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ei(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=si(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ii(t,e){if(void 0!==t.classList)for(var i=lt(e),n=0,o=i.length;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,St(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=zt((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=zt(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=Et([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var l=s.subtract(a.getCenter()),u=a.extend(s).getSize().subtract(h);o.x+=l.x<0?-u.x:u.x,o.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=tt({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(it(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=tt({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=it(this._handleGeolocationResponse,this),i=it(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new kt(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),Xe(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(wt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)Xe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=Ye("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new Ct(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=St(t),i=zt(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),l=Et(this.project(a,n),this.project(r,n)).getSize(),u=ze.any3d?this.options.zoomSnap:1,c=h.x/l.x,d=h.y/l.y,_=e?Math.max(c,d):Math.min(c,d);return n=this.getScaleZoom(_,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new Tt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new Mt(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(Zt(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(zt(t),e)},layerPointToLatLng:function(t){var e=zt(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(Zt(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Zt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(St(t))},distance:function(t,e){return this.options.crs.distance(Zt(t),Zt(e))},containerPointToLayerPoint:function(t){return zt(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return zt(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(zt(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Zt(t)))},mouseEventToContainerPoint:function(t){return function(t,e){if(!e)return new Tt(t.clientX,t.clientY);var i=fi(e),n=i.boundingClientRect;return new Tt((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=function(t){return"string"==typeof t?document.getElementById(t):t}(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");gi(e,"scroll",this._onScroll,this),this._containerId=ot(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,ii(t,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ke(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),li(this._mapPane,new Tt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ii(t.markerPane,"leaflet-zoom-hide"),ii(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){li(this._mapPane,new Tt(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return wt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){li(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[ot(this._container)]=this;var e=t?yi:gi;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){wt(this._resizeRequest),this._resizeRequest=xt((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[ot(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!Ci(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&pi(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=tt({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=ze.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ni(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=Ye("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=Ve,i=this._proxy.style[e];hi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Xe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();hi(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o))&&(xt((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ii(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(it(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ni(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Zi=bt.extend({options:{position:"topright"},initialize:function(t){ut(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ii(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Xe(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});ki.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=Ye("div",e+"control-container",this._container);function n(n,o){var s=e+n+" "+e+o;t[n+o]=Ye("div",s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Xe(this._controlCorners[t]);Xe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Oi=Zi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(ot(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+ot(this),n),this._layerControlInputs.push(e),e.layerId=ot(t.layer),gi(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ne.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),Bi=Zi.extend({options:{position:"topleft",zoomInText:'+',zoomInTitle:"Zoom in",zoomOutText:'−',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=Ye("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=Ye("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ai(s),gi(s,"click",Mi),gi(s,"click",o,this),gi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ni(this._zoomInButton,e),ni(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ii(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ii(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});ki.mergeOptions({zoomControl:!0}),ki.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Bi,this.addControl(this.zoomControl))}));var Ii=Zi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=Ye("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=Ye("div",e,i)),t.imperial&&(this._iScale=Ye("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),Ri=Zi.extend({options:{position:"bottomright",prefix:''+(ze.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){ut(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=Ye("div","leaflet-control-attribution"),Ai(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' | ')}}});ki.mergeOptions({attributionControl:!0}),ki.addInitHook((function(){this.options.attributionControl&&(new Ri).addTo(this)})),Zi.Layers=Oi,Zi.Zoom=Bi,Zi.Scale=Ii,Zi.Attribution=Ri;var Ni=bt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ni.addTo=function(t,e){return t.addHandler(e,this),this};var $i,Di=ze.touch?"touchstart mousedown":"mousedown",Hi=Lt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){ut(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(gi(this._dragStartTarget,Di,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Hi._dragging===this&&this.finishDrag(!0),yi(this._dragStartTarget,Di,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ei(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Hi._dragging===this&&this.finishDrag();else if(!(Hi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Hi._dragging=this,this._preventOutline&&pi(this._element),di(),He(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=function(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}(this._element);this._startPoint=new Tt(e.clientX,e.clientY),this._startPos=ui(this._element),this._parentScale=fi(i);var n="mousedown"===t.type;gi(document,n?"mousemove":"touchmove",this._onMove,this),gi(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new Tt(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)e&&(i.push(t[n]),o=n);oh&&(s=r,h=a);h>i&&(e[s]=1,Wi(t,e,i,n,s),Wi(t,e,i,s,o))}function Fi(t,e,i,n,o){var s,r,a,h=n?$i:qi(t,i),l=qi(e,i);for($i=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=qi(r=Vi(t,e,s=h||l,i,o),i),s===h?(t=r,h=a):(e=r,l=a)}}function Vi(t,e,i,n,o){var s,r,a=e.x-t.x,h=e.y-t.y,l=n.min,u=n.max;return 8&i?(s=t.x+a*(u.y-t.y)/h,r=u.y):4&i?(s=t.x+a*(l.y-t.y)/h,r=l.y):2&i?(s=u.x,r=t.y+h*(u.x-t.x)/a):1&i&&(s=l.x,r=t.y+h*(l.x-t.x)/a),new Tt(s,r,o)}function qi(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function Gi(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Ki(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,h=i.y-r,l=a*a+h*h;return l>0&&((o=((t.x-s)*a+(t.y-r)*h)/l)>1?(s=i.x,r=i.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new Tt(s,r)}function Yi(t){return!dt(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Xi(t,e,i){var n,o,s,r,a,h,l,u,c,d=[1,4,2,8];for(o=0,l=t.length;o1e-7;h++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=l=Math.PI/2-2*Math.atan(r*e)-a;return new kt(a*i,t.x*i/n)}},tn=tt({},Bt,{code:"EPSG:3395",projection:Qi,transformation:function(){var t=.5/(Math.PI*Qi.R);return Nt(t,.5,-t,.5)}()}),en=tt({},Bt,{code:"EPSG:4326",projection:Ji,transformation:Nt(1/180,1,-1/180,.5)}),nn=tt({},Ot,{projection:Ji,transformation:Nt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Ot.Earth=Bt,Ot.EPSG3395=tn,Ot.EPSG3857=Dt,Ot.EPSG900913=Ht,Ot.EPSG4326=en,Ot.Simple=nn;var on=Lt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[ot(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[ot(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});ki.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=ot(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=ot(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return ot(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?dt(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()e)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=Zt(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Ct,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Yi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Yi(t),n=0,o=t.length;n=2&&e[0]instanceof kt&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){pn.prototype._setLatLngs.call(this,t),Yi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Yi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new Tt(e,e);if(t=new Mt(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||pn.prototype._containsPoint.call(this,t,!0)}}),fn=rn.extend({initialize:function(t,e){ut(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=dt(t)?t:t.features;if(o){for(e=0,i=o.length;e0?n:[e.src]}else{dt(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s×',gi(n,"click",this.close,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&n>o?(e.height=o+"px",ii(t,s)):ni(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();li(this._container,e.add(i))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var e=this._map,i=parseInt(Ke(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+i,o=this._containerWidth,s=new Tt(this._containerLeft,-n-this._containerBottom);s._add(ui(this._container));var r=e.layerPointToContainerPoint(s),a=zt(this.options.autoPanPadding),h=zt(this.options.autoPanPaddingTopLeft||a),l=zt(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;r.x+o+l.x>u.x&&(c=r.x+o-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+n+l.y>u.y&&(d=r.y+n-u.y+l.y),r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&e.fire("autopanstart").panBy([c,d],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return zt(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ki.mergeOptions({closePopupOnClick:!0}),ki.include({openPopup:function(t,e,i){return this._initOverlay(Mn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),on.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Mn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Mi(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof cn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var En=zn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){zn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){zn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=zn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ye("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,l=o.offsetHeight,u=zt(this.options.offset),c=this._getAnchor();"top"===a?(e=h/2,i=l):"bottom"===a?(e=h/2,i=0):"center"===a?(e=h/2,i=l/2):"right"===a?(e=0,i=l/2):"left"===a?(e=h,i=l/2):r.xthis.options.maxZoom||in&&this._retainParent(o,s,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new Tt(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var d=o.min.x;d<=o.max.x;d++){var _=new Tt(d,c);if(_.z=this._tileZoom,this._isValidTile(_)){var p=this._tiles[this._tileCoordsToKey(_)];p?p.current=!0:r.push(_)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;di.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return St(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Ct(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new Tt(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(Xe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ii(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=rt,t.onmousemove=rt,ze.ielt9&&this.options.opacity<1&&ri(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),it(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&xt(it(this._tileReady,this,t,null,o)),li(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ri(i.el,0),wt(this._fadeFrame),this._fadeFrame=xt(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ii(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?xt(this._pruneTiles,this):setTimeout(it(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new Tt(this._wrapX?st(t.x,this._wrapX):t.x,this._wrapY?st(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Mt(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Sn=Cn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=ut(this,e)).detectRetina&&ze.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return gi(i,"load",it(this._tileOnLoad,this,e,i)),gi(i,"error",it(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:ze.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return function(t,e){return t.replace(ct,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}(this._url,tt(e,this.options))},_tileOnLoad:function(t,e){ze.ielt9?setTimeout(it(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=rt,e.onerror=rt,!e.complete)){e.src=pt;var i=this._tiles[t].coords;Xe(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",pt),Cn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==pt))return Cn.prototype._tileReady.call(this,t,e,i)}});function kn(t,e){return new Sn(t,e)}var Zn=Sn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=tt({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);var o=(e=ut(this,e)).detectRetina&&ze.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Sn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=Et(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===en?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Sn.prototype.getTileUrl.call(this,t);return a+function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return tt(this.wmsParams,t),e||this.redraw(),this}});Sn.WMS=Zn,kn.wms=function(t,e){return new Zn(t,e)};var On=on.extend({options:{padding:.1},initialize:function(t){ut(this,t),ot(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ii(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));ze.any3d?hi(this._container,s,i):li(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Mt(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Bn=On.extend({options:{tolerance:0},getEvents:function(){var t=On.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){On.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");gi(t,"mousemove",this._onMouseMove,this),gi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),gi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){wt(this._redrawRequest),delete this._ctx,Xe(this._container),yi(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){On.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=ze.retina?2:1;li(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){On.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[ot(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[ot(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Rn={_initContainer:function(){this._container=Ye("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(On.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=In("shape");ii(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=In("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[ot(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;Xe(e),t.removeInteractiveTarget(e),delete this._layers[ot(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=In("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=dt(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=In("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Qe(t._container)},_bringToBack:function(t){ti(t._container)}},Nn=ze.vml?In:jt,$n=On.extend({_initContainer:function(){this._container=Nn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Nn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Xe(this._container),yi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){On.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),li(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Nn("path");t.options.className&&ii(e,t.options.className),t.options.interactive&&ii(e,"leaflet-interactive"),this._updateStyle(t),this._layers[ot(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Xe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[ot(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Ut(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Qe(t._path)},_bringToBack:function(t){ti(t._path)}});ze.vml&&$n.include(Rn),ki.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&function(t){return ze.canvas?new Bn(t):null}(t)||function(t){return ze.svg||ze.vml?new $n(t):null}(t)}}),mn.extend({initialize:function(t,e){mn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=St(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),$n.create=Nn,$n.pointsToPath=Ut,fn.geometryToLayer=gn,fn.coordsToLatLng=yn,fn.coordsToLatLngs=xn,fn.latLngToCoords=wn,fn.latLngsToCoords=bn,fn.getFeature=Pn,fn.asFeature=Ln,ki.mergeOptions({boxZoom:!0});var Dn=Ni.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){gi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){yi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Xe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),He(),di(),this._startPoint=this._map.mouseEventToContainerPoint(t),gi(document,{contextmenu:Mi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=Ye("div","leaflet-zoom-box",this._container),ii(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Mt(this._point,this._startPoint),i=e.getSize();li(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(Xe(this._box),ni(this._container,"leaflet-crosshair")),je(),_i(),yi(document,{contextmenu:Mi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(it(this._resetState,this),0);var e=new Ct(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ki.addInitHook("addHandler","boxZoom",Dn),ki.mergeOptions({doubleClickZoom:!0});var Hn=Ni.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});ki.addInitHook("addHandler","doubleClickZoom",Hn),ki.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var jn=Ni.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Hi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ii(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ni(this._map._container,"leaflet-grab"),ni(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=St(this._map.options.maxBounds);this._offsetLimit=Et(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});ki.addInitHook("addHandler","scrollWheelZoom",Wn);ki.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var Fn=Ni.extend({addHooks:function(){gi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){yi(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new Tt(e.clientX,e.clientY),this._holdTimeout=setTimeout(it((function(){this._cancel(),this._isTapValid()&&(gi(document,"touchend",zi),gi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),gi(document,"touchend touchcancel contextmenu",this._cancel,this),gi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){yi(document,"touchend",zi),yi(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),yi(document,"touchend touchcancel contextmenu",this._cancel,this),yi(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new Tt(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});ki.addInitHook("addHandler","tapHold",Fn),ki.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var Vn=Ni.extend({addHooks:function(){ii(this._map._container,"leaflet-touch-zoom"),gi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ni(this._map._container,"leaflet-touch-zoom"),yi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),gi(document,"touchmove",this._onTouchMove,this),gi(document,"touchend touchcancel",this._onTouchEnd,this),zi(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),wt(this._animRequest);var r=it(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=xt(r,this,!0),zi(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,wt(this._animRequest),yi(document,"touchmove",this._onTouchMove,this),yi(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ki.addInitHook("addHandler","touchZoom",Vn),ki.BoxZoom=Dn,ki.DoubleClickZoom=Hn,ki.Drag=jn,ki.Keyboard=Un,ki.ScrollWheelZoom=Wn,ki.TapHold=Fn,ki.TouchZoom=Vn;customElements.define("pluckr-app",class extends J{static get properties(){return{title:{type:String},location:{type:Object}}}static get styles(){return s`:host{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;font-size:calc(10px + 2vmin);color:#1a2b42;max-width:960px;margin:0 auto;text-align:center;background-color:var(--pluckr-app-background-color)}main{flex-grow:1}#map{height:1096px;width:1096px}`}constructor(){super(),t(this,"map",null),t(this,"defaultIcon",new an({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="})),this.title="My app",this.location={x:52.0474828687443,y:5.080036739440433}}firstUpdated(t){var e,i;super.firstUpdated(t),this.map=(e=this.renderRoot.querySelector("#map"),new ki(e,i)).setView([this.location.x,this.location.y],13),kn("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiamxlbmdyYW5kIiwiYSI6ImNsNWM3YTl3YjBla3ozYm8yMHo3NTRtbHkifQ.mhHRpOn0v-v59tXbvEYnlQ",{maxZoom:19,attribution:'© Mapbox © OpenStreetMap'}).addTo(this.map),this.map.on("moveend",this.moveEnd.bind(this)),this.loadMarkers(this.map.getBounds())}loadMarkers(t){console.log("Success: ;eihgwe;rghwekl;ge"),fetch(`/api/trees?bbox=${t._northEast.lat},${t._northEast.lng},${t._southWest.lat},${t._southWest.lng}`).then((t=>t.json())).then((t=>{console.log("Loaded POIs",t),t.map((t=>{return(e=[t.location.x,t.location.y],i={icon:this.defaultIcon},new un(e,i)).addTo(this.map);var e,i}))})).catch((t=>{console.error("Impossible to log Points of Interests:",t)}))}moveEnd(t){this.loadMarkers(t.target.getBounds())}render(){return Z` ${this.title} `}}); diff --git a/src/main/resources/dist/c3e72859.js b/src/main/resources/dist/c3e72859.js new file mode 100644 index 0000000..85c6c42 --- /dev/null +++ b/src/main/resources/dist/c3e72859.js @@ -0,0 +1,3156 @@ +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),i=new WeakMap;class r{constructor(t,i,r){if(this._$cssResult$=!0,r!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let e=this.o;const r=this.t;if(t&&void 0===e){const t=void 0!==r&&1===r.length;t&&(e=i.get(r)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&i.set(r,e))}return e}toString(){return this.cssText}}const n=(t,...i)=>{const n=1===t.length?t[0]:i.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new r(n,t,e)},o=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,e))(i)})(t):t +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var a;const s=window.trustedTypes,l=s?s.emptyScript:"",h=window.reactiveElementPolyfillSupport,c={toAttribute(t,e){switch(e){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},u=(t,e)=>e!==t&&(e==e||t==t),d={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:u};class p extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const r=this._$Ep(i,e);void 0!==r&&(this._$Ev.set(r,i),t.push(r))})),t}static createProperty(t,e=d){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(r){const n=this[t];this[e]=r,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||d}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var e;const i=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,i)=>{t?e.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((t=>{const i=document.createElement("style"),r=window.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=t.cssText,e.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=d){var r,n;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const a=(null!==(n=null===(r=i.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==n?n:c.toAttribute)(e,i.type);this._$El=t,null==a?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(t,e){var i,r;const n=this.constructor,o=n._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=n.getPropertyOptions(o),a=t.converter,s=null!==(r=null!==(i=null==a?void 0:a.fromAttribute)&&void 0!==i?i:"function"==typeof a?a:null)&&void 0!==r?r:c.fromAttribute;this._$El=o,this[o]=s(e,t.type),this._$El=null}}requestUpdate(t,e,i){let r=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var f;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:p}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.3.3");const m=globalThis.trustedTypes,v=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,_=`lit$${(Math.random()+"").slice(9)}$`,g="?"+_,y=`<${g}>`,x=document,b=(t="")=>x.createComment(t),w=t=>null===t||"object"!=typeof t&&"function"!=typeof t,z=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,E=/>/g,A=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,C=/'/g,S=/"/g,I=/^(?:script|style|textarea|title)$/i,P=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),k=P(1),L=P(2),D=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),O=new WeakMap,B=(t,e,i)=>{var r,n;const o=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let a=o._$litPart$;if(void 0===a){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;o._$litPart$=a=new $(e.insertBefore(b(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a},F=x.createTreeWalker(x,129,null,!1),N=(t,e)=>{const i=t.length-1,r=[];let n,o=2===e?"":"",a=M;for(let e=0;e"===l[0]?(a=null!=n?n:M,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?A:'"'===l[3]?S:C):a===S||a===C?a=A:a===T||a===E?a=M:(a=A,n=void 0);const u=a===A&&t[e+1].startsWith("/>")?" ":"";o+=a===M?i+y:h>=0?(r.push(s),i.slice(0,h)+"$lit$"+i.slice(h)+_+u):i+_+(-2===h?(r.push(void 0),e):u)}const s=o+(t[i]||">")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==v?v.createHTML(s):s,r]};class U{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const a=t.length-1,s=this.parts,[l,h]=N(t,e);if(this.el=U.createElement(l,i),F.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=F.nextNode())&&s.length0){r.textContent=m?m.emptyScript:"";for(let i=0;i{var e;return z(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==R&&w(this._$AH)?this._$AA.nextSibling.data=t:this.k(x.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,n="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=U.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new V(n,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=O.get(t.strings);return void 0===e&&O.set(t.strings,e=new U(t)),e}S(t){z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new $(this.M(b()),this.M(b()),this,this.options)):i=e[r],i._$AI(n),r++;r2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(void 0===n)t=j(this,t,e,0),o=!w(t)||t!==this._$AH&&t!==D,o&&(this._$AH=t);else{const r=t;let a,s;for(t=n[0],a=0;aclass extends t{static get properties(){return{theme:{type:String,reflectToAttribute:!0,observer:"__deprecatedThemePropertyChanged"},_theme:{type:String,readOnly:!0}}}__deprecatedThemePropertyChanged(t){this._set_theme(t)}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,rt=[];function nt(t,e,i={}){var n;t&&(n=t,ht(customElements.get(n))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`)),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof r||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):rt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function ot(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():rt}function at(t=""){let e=0;return 0===t.indexOf("lumo-")||0===t.indexOf("material-")?e=1:0===t.indexOf("vaadin-")&&(e=2),e}function st(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=ot().find((e=>e.moduleId===t));i?e.push(...st(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function lt(t){const e=`${t}-default-theme`,i=ot().filter((i=>i.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`).test(e)))}(i.themeFor,t))).map((t=>({...t,styles:[...st(t),...t.styles],includePriority:at(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:ot().filter((t=>t.moduleId===e))}function ht(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const ct=t=>class extends(it(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!ht(this)&&function(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype),e=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...lt(this.is)];const i=this.__themes.flatMap((t=>t.styles));return i.filter(((t,e)=>e===i.lastIndexOf(t)))}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,ut=n` + :host { + /* Base (background) */ + --lumo-base-color: #fff; + + /* Tint */ + --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3); + --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37); + --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44); + --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5); + --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57); + --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64); + --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7); + --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77); + --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84); + --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9); + --lumo-tint: #fff; + + /* Shade */ + --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05); + --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1); + --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16); + --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26); + --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38); + --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52); + --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6); + --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69); + --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83); + --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94); + --lumo-shade: hsl(214, 35%, 15%); + + /* Contrast */ + --lumo-contrast-5pct: var(--lumo-shade-5pct); + --lumo-contrast-10pct: var(--lumo-shade-10pct); + --lumo-contrast-20pct: var(--lumo-shade-20pct); + --lumo-contrast-30pct: var(--lumo-shade-30pct); + --lumo-contrast-40pct: var(--lumo-shade-40pct); + --lumo-contrast-50pct: var(--lumo-shade-50pct); + --lumo-contrast-60pct: var(--lumo-shade-60pct); + --lumo-contrast-70pct: var(--lumo-shade-70pct); + --lumo-contrast-80pct: var(--lumo-shade-80pct); + --lumo-contrast-90pct: var(--lumo-shade-90pct); + --lumo-contrast: var(--lumo-shade); + + /* Text */ + --lumo-header-text-color: var(--lumo-contrast); + --lumo-body-text-color: var(--lumo-contrast-90pct); + --lumo-secondary-text-color: var(--lumo-contrast-70pct); + --lumo-tertiary-text-color: var(--lumo-contrast-50pct); + --lumo-disabled-text-color: var(--lumo-contrast-30pct); + + /* Primary */ + --lumo-primary-color: hsl(214, 100%, 48%); + --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76); + --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13); + --lumo-primary-text-color: hsl(214, 100%, 43%); + --lumo-primary-contrast-color: #fff; + + /* Error */ + --lumo-error-color: hsl(3, 85%, 48%); + --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5); + --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1); + --lumo-error-text-color: hsl(3, 89%, 42%); + --lumo-error-contrast-color: #fff; + + /* Success */ + --lumo-success-color: hsl(145, 72%, 30%); + --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5); + --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1); + --lumo-success-text-color: hsl(145, 85%, 25%); + --lumo-success-contrast-color: #fff; + } +`,dt=document.createElement("template");dt.innerHTML=``,document.head.appendChild(dt.content);const pt=n` + [theme~='dark'] { + /* Base (background) */ + --lumo-base-color: hsl(214, 35%, 21%); + + /* Tint */ + --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06); + --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14); + --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23); + --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32); + --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41); + --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5); + --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58); + --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69); + --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8); + --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9); + --lumo-tint: hsl(214, 100%, 98%); + + /* Shade */ + --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07); + --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15); + --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23); + --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32); + --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41); + --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5); + --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6); + --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7); + --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8); + --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9); + --lumo-shade: hsl(214, 33%, 13%); + + /* Contrast */ + --lumo-contrast-5pct: var(--lumo-tint-5pct); + --lumo-contrast-10pct: var(--lumo-tint-10pct); + --lumo-contrast-20pct: var(--lumo-tint-20pct); + --lumo-contrast-30pct: var(--lumo-tint-30pct); + --lumo-contrast-40pct: var(--lumo-tint-40pct); + --lumo-contrast-50pct: var(--lumo-tint-50pct); + --lumo-contrast-60pct: var(--lumo-tint-60pct); + --lumo-contrast-70pct: var(--lumo-tint-70pct); + --lumo-contrast-80pct: var(--lumo-tint-80pct); + --lumo-contrast-90pct: var(--lumo-tint-90pct); + --lumo-contrast: var(--lumo-tint); + + /* Text */ + --lumo-header-text-color: var(--lumo-contrast); + --lumo-body-text-color: var(--lumo-contrast-90pct); + --lumo-secondary-text-color: var(--lumo-contrast-70pct); + --lumo-tertiary-text-color: var(--lumo-contrast-50pct); + --lumo-disabled-text-color: var(--lumo-contrast-30pct); + + /* Primary */ + --lumo-primary-color: hsl(214, 90%, 48%); + --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69); + --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13); + --lumo-primary-text-color: hsl(214, 90%, 77%); + --lumo-primary-contrast-color: #fff; + + /* Error */ + --lumo-error-color: hsl(3, 79%, 49%); + --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5); + --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14); + --lumo-error-text-color: hsl(3, 100%, 80%); + + /* Success */ + --lumo-success-color: hsl(145, 72%, 30%); + --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5); + --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1); + --lumo-success-text-color: hsl(145, 85%, 46%); + } + + html { + color: var(--lumo-body-text-color); + background-color: var(--lumo-base-color); + color-scheme: light; + } + + [theme~='dark'] { + color: var(--lumo-body-text-color); + background-color: var(--lumo-base-color); + color-scheme: dark; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--lumo-header-text-color); + } + + a:where(:any-link) { + color: var(--lumo-primary-text-color); + } + + a:not(:any-link) { + color: var(--lumo-disabled-text-color); + } + + blockquote { + color: var(--lumo-secondary-text-color); + } + + code, + pre { + background-color: var(--lumo-contrast-10pct); + border-radius: var(--lumo-border-radius-m); + } +`;nt("",pt,{moduleId:"lumo-color"});nt("",[pt,n` + :host { + color: var(--lumo-body-text-color) !important; + background-color: var(--lumo-base-color) !important; + } +`],{moduleId:"lumo-color-legacy"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const ft=n` + :host { + --lumo-size-xs: 1.625rem; + --lumo-size-s: 1.875rem; + --lumo-size-m: 2.25rem; + --lumo-size-l: 2.75rem; + --lumo-size-xl: 3.5rem; + + /* Icons */ + --lumo-icon-size-s: 1.25em; + --lumo-icon-size-m: 1.5em; + --lumo-icon-size-l: 2.25em; + /* For backwards compatibility */ + --lumo-icon-size: var(--lumo-icon-size-m); + } +`,mt=document.createElement("template");mt.innerHTML=``,document.head.appendChild(mt.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const vt=n` + :host { + /* Border radius */ + --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */ + --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */ + --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */ + --lumo-border-radius: 0.25em; /* Deprecated */ + + /* Shadow */ + --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct); + --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct); + --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct); + --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct); + --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct); + + /* Clickable element cursor */ + --lumo-clickable-cursor: default; + } +`,_t=document.createElement("template");_t.innerHTML=``,document.head.appendChild(_t.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const gt=n` + :host { + /* prettier-ignore */ + --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + + /* Font sizes */ + --lumo-font-size-xxs: 0.75rem; + --lumo-font-size-xs: 0.8125rem; + --lumo-font-size-s: 0.875rem; + --lumo-font-size-m: 1rem; + --lumo-font-size-l: 1.125rem; + --lumo-font-size-xl: 1.375rem; + --lumo-font-size-xxl: 1.75rem; + --lumo-font-size-xxxl: 2.5rem; + + /* Line heights */ + --lumo-line-height-xs: 1.25; + --lumo-line-height-s: 1.375; + --lumo-line-height-m: 1.625; + } +`;nt("",n` + html, + :host { + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size, var(--lumo-font-size-m)); + line-height: var(--lumo-line-height-m); + -webkit-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + small, + [theme~='font-size-s'] { + font-size: var(--lumo-font-size-s); + line-height: var(--lumo-line-height-s); + } + + [theme~='font-size-xs'] { + font-size: var(--lumo-font-size-xs); + line-height: var(--lumo-line-height-xs); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-weight: 600; + line-height: var(--lumo-line-height-xs); + margin-top: 1.25em; + } + + h1 { + font-size: var(--lumo-font-size-xxxl); + margin-bottom: 0.75em; + } + + h2 { + font-size: var(--lumo-font-size-xxl); + margin-bottom: 0.5em; + } + + h3 { + font-size: var(--lumo-font-size-xl); + margin-bottom: 0.5em; + } + + h4 { + font-size: var(--lumo-font-size-l); + margin-bottom: 0.5em; + } + + h5 { + font-size: var(--lumo-font-size-m); + margin-bottom: 0.25em; + } + + h6 { + font-size: var(--lumo-font-size-xs); + margin-bottom: 0; + text-transform: uppercase; + letter-spacing: 0.03em; + } + + p, + blockquote { + margin-top: 0.5em; + margin-bottom: 0.75em; + } + + a { + text-decoration: none; + } + + a:where(:any-link):hover { + text-decoration: underline; + } + + hr { + display: block; + align-self: stretch; + height: 1px; + border: 0; + padding: 0; + margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2); + background-color: var(--lumo-contrast-10pct); + } + + blockquote { + border-left: 2px solid var(--lumo-contrast-30pct); + } + + b, + strong { + font-weight: 600; + } + + /* RTL specific styles */ + blockquote[dir='rtl'] { + border-left: none; + border-right: 2px solid var(--lumo-contrast-30pct); + } +`,{moduleId:"lumo-typography"});const yt=document.createElement("template");yt.innerHTML=``,document.head.appendChild(yt.content),nt("vaadin-input-container",n` + :host { + border-radius: var(--lumo-border-radius-m); + background-color: var(--lumo-contrast-10pct); + padding: 0 calc(0.375em + var(--lumo-border-radius-m) / 4 - 1px); + font-weight: 500; + line-height: 1; + position: relative; + cursor: text; + box-sizing: border-box; + } + + /* Used for hover and activation effects */ + :host::after { + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + border-radius: inherit; + pointer-events: none; + background-color: var(--lumo-contrast-50pct); + opacity: 0; + transition: transform 0.15s, opacity 0.2s; + transform-origin: 100% 0; + } + + ::slotted(:not([slot$='fix'])) { + cursor: inherit; + min-height: var(--lumo-text-field-size, var(--lumo-size-m)); + padding: 0 0.25em; + --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em); + -webkit-mask-image: var(--_lumo-text-field-overflow-mask-image); + mask-image: var(--_lumo-text-field-overflow-mask-image); + } + + /* Read-only */ + :host([readonly]) { + color: var(--lumo-secondary-text-color); + background-color: transparent; + cursor: default; + } + + :host([readonly])::after { + background-color: transparent; + opacity: 1; + border: 1px dashed var(--lumo-contrast-30pct); + } + + /* Disabled */ + :host([disabled]) { + background-color: var(--lumo-contrast-5pct); + } + + :host([disabled]) ::slotted(*) { + color: var(--lumo-disabled-text-color); + -webkit-text-fill-color: var(--lumo-disabled-text-color); + } + + /* Invalid */ + :host([invalid]) { + background-color: var(--lumo-error-color-10pct); + } + + :host([invalid])::after { + background-color: var(--lumo-error-color-50pct); + } + + /* Slotted icons */ + ::slotted(iron-icon), + ::slotted(vaadin-icon) { + color: var(--lumo-contrast-60pct); + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + + /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */ + ::slotted(iron-icon[icon^='vaadin:']), + ::slotted(vaadin-icon[icon^='vaadin:']) { + padding: 0.25em; + box-sizing: border-box !important; + } + + /* Text align */ + :host([dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em); + } + + @-moz-document url-prefix() { + :host([dir='rtl']) ::slotted(:not([slot$='fix'])) { + mask-image: var(--_lumo-text-field-overflow-mask-image); + } + } + + :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) { + text-align: start; + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) { + text-align: center; + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) { + text-align: end; + --_lumo-text-field-overflow-mask-image: none; + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em); + } + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em); + } + } + + /* RTL specific styles */ + :host([dir='rtl'])::after { + transform-origin: 0% 0; + } + + :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: none; + } + + :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: none; + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em); + } + } + + @-moz-document url-prefix() { + /* Firefox is smart enough to align overflowing text to right */ + :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) { + --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em); + } + } + `,{moduleId:"lumo-input-container"}), +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +window.JSCompiler_renameProperty=function(t,e){return t}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +let xt,bt,wt=/(url\()([^)]*)(\))/g,zt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Mt(t,e){if(t&&zt.test(t))return t;if("//"===t)return t;if(void 0===xt){xt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",xt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),xt)try{return new URL(t,e).href}catch(e){return t}return bt||(bt=document.implementation.createHTMLDocument("temp"),bt.base=bt.createElement("base"),bt.head.appendChild(bt.base),bt.anchor=bt.createElement("a"),bt.body.appendChild(bt.anchor)),bt.base.href=e,bt.anchor.href=t,bt.anchor.href||t}function Tt(t,e){return t.replace(wt,(function(t,i,r,n){return i+"'"+Mt(r.replace(/["']/g,""),e)+"'"+n}))}function Et(t){return t.substring(0,t.lastIndexOf("/")+1)} +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/const At=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const Ct=At&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let St=window.Polymer&&window.Polymer.rootPath||Et(document.baseURI||window.location.href),It=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;window.Polymer&&window.Polymer.setPassiveTouchGestures;let Pt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,kt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Lt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Dt=window.Polymer&&window.Polymer.legacyWarnings||!1,Rt=window.Polymer&&window.Polymer.syncInitialRender||!1,Ot=window.Polymer&&window.Polymer.legacyUndefined||!1,Bt=window.Polymer&&window.Polymer.orderedComputed||!1,Ft=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Nt=window.Polymer&&window.Polymer.fastDomIf||!1;window.Polymer&&window.Polymer.suppressTemplateNotifications,window.Polymer&&window.Polymer.legacyNoObservedAttributes;let Ut=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,jt=0; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/const Vt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=jt++;return function(r){let n=r.__mixinSet;if(n&&n[i])return r;let o=e,a=o.get(r);if(!a){a=t(r),o.set(r,a);let e=Object.create(a.__mixinSet||n||null);e[i]=!0,a.__mixinSet=e}return a}}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let $t={},Gt={};function qt(t,e){$t[t]=Gt[t.toLowerCase()]=e}function Zt(t){return $t[t]||Gt[t.toLowerCase()]}class Ht extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Zt(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,r){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Mt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Et(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Pt&&void 0!==Zt(t))throw qt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,qt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Ht.prototype.modules=$t,customElements.define("dom-module",Ht);function Wt(t){return Ht.import(t)}function Xt(t){const e=Tt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Yt(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;tShadyDOM.patch(t):t=>t +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/;function ee(t){return t.indexOf(".")>=0}function ie(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function re(t,e){return 0===e.indexOf(t+".")}function ne(t,e,i){return e+i.slice(t.length)}function oe(t){if(Array.isArray(t)){let e=[];for(let i=0;i1){for(let t=0;tt[1].toUpperCase())))}function pe(t){return he[t]||(he[t]=t.replace(ue,"-$1").toLowerCase())} +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let fe=0,me=0,ve=[],_e=0,ge=!1,ye=document.createTextNode("");new window.MutationObserver((function(){ge=!1;const t=ve.length;for(let e=0;e{throw t}))}}ve.splice(0,t),me+=t})).observe(ye,{characterData:!0});const xe={run:t=>(ge||(ge=!0,ye.textContent=_e++),ve.push(t),fe++),cancel(t){const e=t-me;if(e>=0){if(!ve[e])throw new Error("invalid async handle: "+t);ve[e]=null}}},be=xe,we=Vt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let r=this.__data[t],n=this._shouldPropertyChange(t,e,r);return n&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),n}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,be.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,r){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,r)}_attributeToProperty(t,e,i){if(!this.__serializing){const r=this.__dataAttributes,n=r&&r[t]||t;this[n]=this._deserializeValue(e,i||this.constructor.typeForProperty(n))}}_propertyToAttribute(t,e,i){this.__serializing=!0,i=arguments.length<3?this[t]:i,this._valueToNodeAttribute(this,i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const r=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=te(t)),void 0===r?t.removeAttribute(i):t.setAttribute(i,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),ze={}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/let Me=HTMLElement.prototype;for(;Me;){let t=Object.getOwnPropertyNames(Me);for(let e=0;etrustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const Ee=Vt((t=>{const e=we(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,r)=>{const n=i.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(n,r)):e.setAttribute(r,n)}})();function ke(t){let e=t.getAttribute("is");if(e&&Ae[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];Pe(t,i,e),i.removeAttribute(e)}}return t}function Le(t,e){let i=e.parentInfo&&Le(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function De(t,e,i,r){r.id&&(e[r.id]=i)}function Re(t,e,i){if(i.events&&i.events.length)for(let r,n=0,o=i.events;nclass extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let r=!1,n=t;return"template"!=n.localName||n.hasAttribute("preserve-content")?"slot"===n.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(n,e,i)||r,Ie(n),n.firstChild&&this._parseTemplateChildNodes(n,e,i),n.hasAttributes&&n.hasAttributes()&&(r=this._parseTemplateNodeAttributes(n,e,i)||r),r||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let r,n=t.firstChild,o=0;n;n=r){if("template"==n.localName&&(n=ke(n)),r=n.nextSibling,n.nodeType===Node.TEXT_NODE){let i=r;for(;i&&i.nodeType===Node.TEXT_NODE;)n.textContent+=i.textContent,r=i.nextSibling,t.removeChild(i),i=r;if(e.stripWhiteSpace&&!n.textContent.trim()){t.removeChild(n);continue}}let a={parentIndex:o,parentInfo:i};this._parseTemplateNode(n,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),n.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let r=t,n=this._parseTemplate(r,e);return(n.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),i.templateInfo=n,!0}static _parseTemplateNodeAttributes(t,e,i){let r=!1,n=Array.from(t.attributes);for(let o,a=n.length-1;o=n[a];a--)r=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,i,r,n){return"on-"===r.slice(0,3)?(t.removeAttribute(r),i.events=i.events||[],i.events.push({name:r.slice(3),value:n}),!0):"id"===r&&(i.id=n,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,n=document.importNode(r,!0);n.__noInsertionPoint=!e.hasInsertionPoint;let o=n.nodeList=new Array(i.length);n.$={};for(let t,r=0,a=i.length;r!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||n.push(t);return{counts:i,ready:n,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=i[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--n[e]&&o.push(e)}))}if(0!==a){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)Qe(t,n,a,o,r);let s;for(;s=a.shift();)ti(t,"",e,i,s)&&Qe(s.methodInfo,n,a,o,r);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;$e(t,n,o,i,r);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}const Je=(t,e,i)=>{let r=0,n=e.length-1,o=-1;for(;r<=n;){const a=r+n>>1,s=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(s<0)r=a+1;else{if(!(s>0)){o=a;break}n=a-1}}o<0&&(o=n+1),e.splice(o,0,t)},Qe=(t,e,i,r,n)=>{const o=e[n?ie(t):t];if(o)for(let e=0;eh.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let r=i[e];e=ne(h.source,l.target,e),s._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(s)}else{let a=n.evaluator._evaluateBinding(t,h,e,i,r,o);a!==Ne&&function(t,e,i,r,n){n=function(t,e,i,r){if(i.isCompound){let n=t.__dataCompoundStorage[i.target];n[r.compoundIndex]=e,e=n.join("")}"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,n,i,r),It&&(n=It(n,i.target,i.kind,e));if("attribute"==i.kind)t._valueToNodeAttribute(e,n,i.target);else{let r=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[Ue.READ_ONLY]&&e[Ue.READ_ONLY][r]||e._setPendingProperty(r,n)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,n)}}(t,s,l,h,a)}}function ni(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,n=new Array(r.length);for(let t=0;t="0"&&r<="9"&&(r="#"),r){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ie(e),i.structured=ee(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function pi(t,e,i){let r=se(t,i);return void 0===r&&(r=e[i]),r}function fi(t,e,i,r){const n={indexSplices:r};Ot&&!t._overrideLegacyUndefined&&(e.splices=n),t.notifyPath(i+".splices",n),t.notifyPath(i+".length",e.length),Ot&&!t._overrideLegacyUndefined&&(n.indexSplices=[])}function mi(t,e,i,r,n,o){fi(t,e,i,[{index:r,addedCount:n,removed:o,object:e,type:"splice"}])}const vi=Vt((t=>{const e=Be(Ee(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Ue}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(_i.length){let t=_i[_i.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ue.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ue.READ_ONLY);let r=Ve(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(i)}_removePropertyEffect(t,e,i){let r=Ve(this,e,!0)[t],n=r.indexOf(i);n>=0&&r.splice(n,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ue.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ue.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ue.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ue.COMPUTE)}_setPendingPropertyOrPath(t,e,i,r){if(r||ie(Array.isArray(t)?t[0]:t)!==t){if(!r){let i=se(this,t);if(!(t=le(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let r=t.__dataLinkedPaths;if(r){let n;for(let o in r){let a=r[o];re(o,e)?(n=ne(o,a,e),t._setPendingPropertyOrPath(n,i,!0,!0)):re(a,e)&&(n=ne(a,o,e),t._setPendingPropertyOrPath(n,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=te(t)),t[e]=i)}_setPendingProperty(t,e,i){let r=this.__dataHasPaths&&ee(t),n=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,n[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[Ue.NOTIFY]&&this[Ue.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e{$e(this,t.propertyEffects,e,i,r,t.nodeList);for(let n=t.firstChild;n;n=n.nextSibling)this._runEffectsForTemplate(n,e,i,r)};t.runEffects?t.runEffects(n,e,r):n(e,r)}linkPaths(t,e){t=oe(t),e=oe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=oe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};fi(this,se(this,t,i),i.path,e)}get(t,e){return se(e||this,t)}set(t,e,i){i?le(i,t,e):this[Ue.READ_ONLY]&&this[Ue.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},r=se(this,t,i),n=r.length,o=r.push(...e);return e.length&&mi(this,r,i.path,n,e.length,[]),o}pop(t){let e={path:""},i=se(this,t,e),r=Boolean(i.length),n=i.pop();return r&&mi(this,i,e.path,i.length,0,[n]),n}splice(t,e,i,...r){let n,o={path:""},a=se(this,t,o);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),n=2===arguments.length?a.splice(e):a.splice(e,i,...r),(r.length||n.length)&&mi(this,a,o.path,e,r.length,n),n}shift(t){let e={path:""},i=se(this,t,e),r=Boolean(i.length),n=i.shift();return r&&mi(this,i,e.path,0,0,[n]),n}unshift(t,...e){let i={path:""},r=se(this,t,i),n=r.unshift(...e);return e.length&&mi(this,r,i.path,0,e.length,[]),n}notifyPath(t,e){let i;if(1==arguments.length){let r={path:""};e=se(this,t,r),i=r.path}else i=Array.isArray(t)?oe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ue.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let r={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Ue.OBSERVE,{fn:Ze,info:r,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ue.OBSERVE,{fn:Ze,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let i=ui(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");ai(this,i,Ue.OBSERVE,si,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ue.NOTIFY,{fn:Xe,info:{eventName:pe(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ue.REFLECT,{fn:Ye,info:{attrName:e}})}_createComputedProperty(t,e,i){let r=ui(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const n=ai(this,r,Ue.COMPUTE,ti,t,i);Ve(this,"__computeInfo")[t]=n}_marshalArgs(t,e,i){const r=this.__data,n=[];for(let o=0,a=t.length;o1)return Ne;n[o]=h}return n}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==i;if(!r)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=r,r?r.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),_i.push(this);let i=super._stampTemplate(t,e);if(_i.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:r}=e;if(r.length)for(let e=0;en&&r.push({literal:t.slice(n,i.index)});let o=i[1][0],a=Boolean(i[2]),s=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=s.indexOf("::"))>0&&(h=s.substring(c+2),s=s.substring(0,c),l=!0);let u=ui(s),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e{const e=we(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof n?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e= +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +function(t){const e={};for(let i in t){const r=t[i];e[i]="function"==typeof r?{type:r}:r}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class n extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return n})),yi=window.ShadyCSS&&window.ShadyCSS.cssBuild,xi=Vt((t=>{const e=gi(vi(t));function i(t,e,i,r){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,r)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,r[i.observer]),t._addPropertyToAttributeMap(e)}function r(t,e,i,r){if(!yi){const n=e.content.querySelectorAll("style"),o=Jt(e),a=function(t){let e=Wt(t);return e?Qt(e):[]}(i),s=e.content.firstElementChild;for(let i=0;i{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Lt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let r=0;rt}); +/** + * @fileoverview + * @suppress {checkPrototypalTypes} + * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt The complete set of authors may be found + * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may + * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by + * Google as part of the polymer project is also subject to an additional IP + * rights grant found at http://polymer.github.io/PATENTS.txt + */class wi{constructor(t,e){Ti(t,e);const i=e.reduce(((e,i,r)=>e+zi(i)+t[r+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function zi(t){if(t instanceof wi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Mi=function(t,...e){Ti(t,e);const i=document.createElement("template");let r=e.reduce(((e,i,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof wi)return zi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[r+1]),t[0]);return bi&&(r=bi.createHTML(r)),i.innerHTML=r,i},Ti=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Ei=xi(HTMLElement); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class Ai{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let e="reverse";return t.scrollLeft>0?e="default":(t.scrollLeft=2,t.scrollLeft<2&&(e="negative")),document.body.removeChild(t),e}static getNormalizedScrollLeft(t,e,i){const{scrollLeft:r}=i;if("rtl"!==e||!t)return r;switch(t){case"negative":return i.scrollWidth-i.clientWidth+r;case"reverse":return i.scrollWidth-i.clientWidth-r;default:return r}}static setNormalizedScrollLeft(t,e,i,r){if("rtl"===e&&t)switch(t){case"negative":i.scrollLeft=i.clientWidth-i.scrollWidth+r;break;case"reverse":i.scrollLeft=i.scrollWidth-i.clientWidth-r;break;default:i.scrollLeft=r}else i.scrollLeft=r}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const Ci=[];let Si;function Ii(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Pi(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Pi();Ci.forEach((e=>{Ii(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ki=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}static finalize(){super.finalize(),Si||(Si=Ai.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Ii(this,Pi(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const r=Pi(),n=i===r&&-1===Ci.indexOf(this),o=!i&&e&&-1===Ci.indexOf(this),a=i!==r&&e===r;n||o?(this.__subscribe(),Ii(this,r,i)):a&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(t=!0){t?Ci.includes(this)||Ci.push(this):Ci.includes(this)&&Ci.splice(Ci.indexOf(this),1)}__getNormalizedScrollLeft(t){return Ai.getNormalizedScrollLeft(Si,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Ai.setNormalizedScrollLeft(Si,this.getAttribute("dir")||"ltr",t,e)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class Li extends(ct(ki(Ei))){static get is(){return"vaadin-input-container"}static get template(){return Mi` + + + + + `}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}customElements.define(Li.is,Li);const Di=n` + /* Needed for Safari, where ::slotted(...)::placeholder does not work */ + :is(input[slot='input'], textarea[slot='textarea'])::placeholder { + font: inherit; + color: inherit; + } +`,Ri=document.createElement("template");Ri.innerHTML=``,document.head.appendChild(Ri.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Oi=document.createElement("template");Oi.innerHTML='\n \n',document.head.appendChild(Oi.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Bi=n` + :host { + /* Square */ + --lumo-space-xs: 0.25rem; + --lumo-space-s: 0.5rem; + --lumo-space-m: 1rem; + --lumo-space-l: 1.5rem; + --lumo-space-xl: 2.5rem; + + /* Wide */ + --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs); + --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s); + --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m); + --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l); + --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl); + + /* Tall */ + --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2); + --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2); + --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2); + --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2); + --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2); + } +`,Fi=document.createElement("template");Fi.innerHTML=``,document.head.appendChild(Fi.content); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Ni=n` + [part$='button'] { + flex: none; + width: 1em; + height: 1em; + line-height: 1; + font-size: var(--lumo-icon-size-m); + text-align: center; + color: var(--lumo-contrast-60pct); + transition: 0.2s color; + cursor: var(--lumo-clickable-cursor); + } + + [part$='button']:hover { + color: var(--lumo-contrast-90pct); + } + + :host([disabled]) [part$='button'], + :host([readonly]) [part$='button'] { + color: var(--lumo-contrast-20pct); + cursor: default; + } + + [part$='button']::before { + font-family: 'lumo-icons'; + display: block; + } +`;nt("",Ni,{moduleId:"lumo-field-button"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Ui=n` + :host([has-helper]) [part='helper-text']::before { + content: ''; + display: block; + height: 0.4em; + } + + [part='helper-text'] { + display: block; + color: var(--lumo-secondary-text-color); + font-size: var(--lumo-font-size-xs); + line-height: var(--lumo-line-height-xs); + margin-left: calc(var(--lumo-border-radius-m) / 4); + transition: color 0.2s; + } + + :host(:hover:not([readonly])) [part='helper-text'] { + color: var(--lumo-body-text-color); + } + + :host([disabled]) [part='helper-text'] { + color: var(--lumo-disabled-text-color); + -webkit-text-fill-color: var(--lumo-disabled-text-color); + } + + :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before { + display: none; + } + + :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after { + content: ''; + display: block; + height: 0.4em; + } + + :host([has-helper][theme~='helper-above-field']) [part='label'] { + order: 0; + padding-bottom: 0.4em; + } + + :host([has-helper][theme~='helper-above-field']) [part='helper-text'] { + order: 1; + } + + :host([has-helper][theme~='helper-above-field']) [part='label'] + * { + order: 2; + } + + :host([has-helper][theme~='helper-above-field']) [part='error-message'] { + order: 3; + } +` +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,ji=n` + [part='label'] { + align-self: flex-start; + color: var(--lumo-secondary-text-color); + font-weight: 500; + font-size: var(--lumo-font-size-s); + margin-left: calc(var(--lumo-border-radius-m) / 4); + transition: color 0.2s; + line-height: 1; + padding-right: 1em; + padding-bottom: 0.5em; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: relative; + max-width: 100%; + box-sizing: border-box; + } + + :host([has-label])::before { + margin-top: calc(var(--lumo-font-size-s) * 1.5); + } + + :host([has-label][theme~='small'])::before { + margin-top: calc(var(--lumo-font-size-xs) * 1.5); + } + + :host([has-label]) { + padding-top: var(--lumo-space-m); + } + + :host([required]) [part='required-indicator']::after { + content: var(--lumo-required-field-indicator, '•'); + transition: opacity 0.2s; + color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color)); + position: absolute; + right: 0; + width: 1em; + text-align: center; + } + + :host([invalid]) [part='required-indicator']::after { + color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color)); + } + + [part='error-message'] { + margin-left: calc(var(--lumo-border-radius-m) / 4); + font-size: var(--lumo-font-size-xs); + line-height: var(--lumo-line-height-xs); + color: var(--lumo-error-text-color); + will-change: max-height; + transition: 0.4s max-height; + max-height: 5em; + } + + :host([has-error-message]) [part='error-message']::before, + :host([has-error-message]) [part='error-message']::after { + content: ''; + display: block; + height: 0.4em; + } + + :host(:not([invalid])) [part='error-message'] { + max-height: 0; + overflow: hidden; + } + + /* RTL specific styles */ + + :host([dir='rtl']) [part='label'] { + margin-left: 0; + margin-right: calc(var(--lumo-border-radius-m) / 4); + } + + :host([dir='rtl']) [part='label'] { + padding-left: 1em; + padding-right: 0; + } + + :host([dir='rtl']) [part='required-indicator']::after { + right: auto; + left: 0; + } + + :host([dir='rtl']) [part='error-message'] { + margin-left: 0; + margin-right: calc(var(--lumo-border-radius-m) / 4); + } +`;nt("",ji,{moduleId:"lumo-required-field"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Vi=[ji,Ni,Ui,n` + :host { + --lumo-text-field-size: var(--lumo-size-m); + color: var(--lumo-body-text-color); + font-size: var(--lumo-font-size-m); + font-family: var(--lumo-font-family); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: transparent; + padding: var(--lumo-space-xs) 0; + } + + :host::before { + height: var(--lumo-text-field-size); + box-sizing: border-box; + display: inline-flex; + align-items: center; + } + + :host([focused]:not([readonly])) [part='label'] { + color: var(--lumo-primary-text-color); + } + + :host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) { + -webkit-mask-image: none; + mask-image: none; + } + + ::slotted(:is(input, textarea):placeholder-shown) { + color: var(--lumo-secondary-text-color); + } + + /* Hover */ + :host(:hover:not([readonly]):not([focused])) [part='label'] { + color: var(--lumo-body-text-color); + } + + :host(:hover:not([readonly]):not([focused])) [part='input-field']::after { + opacity: 0.1; + } + + /* Touch device adjustment */ + @media (pointer: coarse) { + :host(:hover:not([readonly]):not([focused])) [part='label'] { + color: var(--lumo-secondary-text-color); + } + + :host(:hover:not([readonly]):not([focused])) [part='input-field']::after { + opacity: 0; + } + + :host(:active:not([readonly]):not([focused])) [part='input-field']::after { + opacity: 0.2; + } + } + + /* Trigger when not focusing using the keyboard */ + :host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after { + transform: scaleX(0); + transition-duration: 0.15s, 1s; + } + + /* Focus-ring */ + :host([focus-ring]) [part='input-field'] { + box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct); + } + + /* Read-only and disabled */ + :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) { + opacity: 0; + } + + /* Disabled style */ + :host([disabled]) { + pointer-events: none; + } + + :host([disabled]) [part='label'], + :host([disabled]) [part='input-field'] ::slotted(*) { + color: var(--lumo-disabled-text-color); + -webkit-text-fill-color: var(--lumo-disabled-text-color); + } + + /* Invalid style */ + :host([invalid][focus-ring]) [part='input-field'] { + box-shadow: 0 0 0 2px var(--lumo-error-color-50pct); + } + + :host([input-prevented]) [part='input-field'] { + animation: shake 0.15s infinite; + } + + @keyframes shake { + 25% { + transform: translateX(4px); + } + 75% { + transform: translateX(-4px); + } + } + + /* Small theme */ + :host([theme~='small']) { + font-size: var(--lumo-font-size-s); + --lumo-text-field-size: var(--lumo-size-s); + } + + :host([theme~='small']) [part='label'] { + font-size: var(--lumo-font-size-xs); + } + + :host([theme~='small']) [part='error-message'] { + font-size: var(--lumo-font-size-xxs); + } + + /* Slotted content */ + [part='input-field'] ::slotted(:not(iron-icon):not(vaadin-icon):not(input):not(textarea)) { + color: var(--lumo-secondary-text-color); + font-weight: 400; + } + + [part='clear-button']::before { + content: var(--lumo-icons-cross); + } +`];nt("",Vi,{moduleId:"lumo-input-field-shared-styles"}), +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +nt("vaadin-text-field",Vi,{moduleId:"lumo-text-field-styles"});const $i=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Gi=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function qi(t,e){if("function"!=typeof t)return;const i=$i.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};const Zi=function(t,e){if(window.Vaadin.developmentMode)return qi(t,e)};function Hi(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Gi?!(Gi&&Object.keys(Gi).map((t=>Gi[t])).filter((t=>t.productionMode)).length>0):!qi((function(){return!0})))}catch(t){return!1}}()); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +let Wi=0,Xi=0;const Yi=[];let Ki=0,Ji=!1;const Qi=document.createTextNode("");new window.MutationObserver((function(){Ji=!1;const t=Yi.length;for(let e=0;e{throw t}))}}Yi.splice(0,t),Xi+=t})).observe(Qi,{characterData:!0});const tr={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},er={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ir={run(t){Ji||(Ji=!0,Qi.textContent=Ki,Ki+=1),Yi.push(t);const e=Wi;return Wi+=1,e},cancel(t){const e=t-Xi;if(e>=0){if(!Yi[e])throw new Error(`invalid async handle: ${t}`);Yi[e]=null}}}; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +class rr{static debounce(t,e,i){return t instanceof rr?t._cancelAsync():t=new rr,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,or.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),or.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let nr,or=new Set; +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +window.Vaadin=window.Vaadin||{},window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Zi(Hi)};const ar=new Set,sr=t=>class extends(ki(t)){static get version(){return"23.1.3"}static finalize(){super.finalize();const{is:t}=this;var e;t&&!ar.has(t)&&(window.Vaadin.registrations.push(this),ar.add(t),window.Vaadin.developmentModeCallback&&(nr=rr.debounce(nr,er,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),e=nr,or.add(e)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add to the HTML document.')}} +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/;function lr(t,e,i){return{index:t,removed:e,addedCount:i}}function hr(t,e,i,r,n,o){let a,s=0,l=0,h=Math.min(i-e,o-n);if(0==e&&0==n&&(s=function(t,e,i){for(let r=0;r0||i>0;){if(0==e){n.push(2),i--;continue}if(0==i){n.push(3),e--;continue}let o,a=t[e-1][i-1],s=t[e-1][i],l=t[e][i-1];o=sur(t)?te(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){ur(this._target)?this._listenSlots([this._target]):te(this._target).children&&(this._listenSlots(te(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){ur(this._target)?this._unlistenSlots([this._target]):te(this._target).children&&(this._unlistenSlots(te(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,xe.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;ee.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}initNode(t){const{slotInitializer:e}=this;e&&e(this.host,t)}initCustomNode(t){}teardownNode(t){}observe(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new dr(i,(t=>{const e=this.node,i=t.addedNodes.find((t=>t!==e));t.removedNodes.length&&t.removedNodes.forEach((t=>{this.teardownNode(t)})),i&&(e&&e.isConnected&&this.host.removeChild(e),this.node=i,i!==this.defaultNode&&(this.initCustomNode(i),this.initNode(i)))}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class fr extends pr{constructor(t,e){super(t,"input",(()=>document.createElement("input")),((t,i)=>{t.value&&i.setAttribute("value",t.value),t.type&&i.setAttribute("type",t.type);const r=fr._uniqueInputId=1+fr._uniqueInputId||0;t._inputId=`${t.localName}-${r}`,i.id=t._inputId,"function"==typeof e&&e(i)}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const mr=Vt((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */let vr=!1;window.addEventListener("keydown",(()=>{vr=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{vr=!1}),{capture:!0});const _r=Vt((t=>class extends t{get _keyboardActive(){return vr}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),gr=Vt((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),yr=t=>class extends(gr(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,xr=Vt((t=>class extends(_r(yr(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),br=Vt((t=>class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class wr extends pr{constructor(t){super(t,"error-message",(()=>document.createElement("div")),((t,e)=>{this.__updateErrorId(e),this.__updateHasError()}))}get errorId(){return this.node&&this.node.id}setErrorMessage(t){this.errorMessage=t,this.__updateHasError()}setInvalid(t){this.invalid=t,this.__updateHasError()}initCustomNode(t){this.__updateErrorId(t),t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),this.__updateHasError()}teardownNode(t){let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e)),this.__updateHasError()}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__updateHasError(){const t=this.node,e=Boolean(this.invalid&&this.__isNotEmpty(this.errorMessage));t&&(t.textContent=e?this.errorMessage:"",t.hidden=!e,e?t.setAttribute("role","alert"):t.removeAttribute("role")),this.host.toggleAttribute("has-error-message",e)}__updateErrorId(t){t.id||(t.id=this.defaultId)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function zr(t){return t?new Set(t.split(" ")):new Set}function Mr(t){return[...t].join(" ")} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class Tr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId),this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){this.__isGroupField?this.__setAriaAttributeId("aria-labelledby",t,e):this.__setAriaAttributeId("aria-describedby",t,e)}__setHelperIdToAriaAttribute(t,e){this.__isGroupField?this.__setAriaAttributeId("aria-labelledby",t,e):this.__setAriaAttributeId("aria-describedby",t,e)}__setAriaRequiredAttribute(t){this.__target&&this.__isGroupField&&(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required"))}__setAriaAttributeId(t,e,i){this.__target&&(i&&function(t,e,i){const r=zr(t.getAttribute(e));r.delete(i),0!==r.size?t.setAttribute(e,Mr(r)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const r=zr(t.getAttribute(e));r.add(i),t.setAttribute(e,Mr(r))}(this.__target,t,e))}} +/** + * @license + * Copyright (c) 2021 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class Er extends pr{constructor(t){super(t,"helper")}get helperId(){return this.node&&this.node.id}initCustomNode(t){this.__updateHelperId(t),this.__observeHelper(t);const e=this.__hasHelper(t);this.__toggleHasHelper(e)}teardownNode(t){this.__helperIdObserver&&this.__helperIdObserver.disconnect();const e=this.getSlotChild();if(e&&e!==this.defaultNode){const t=this.__hasHelper(e);this.__toggleHasHelper(t)}else this.__applyDefaultHelper(this.helperText,e)}setHelperText(t){this.helperText=t;const e=this.getSlotChild();e&&e!==this.defaultNode||this.__applyDefaultHelper(t,e)}__hasHelper(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return t&&""!==t.trim()}__applyDefaultHelper(t,e){const i=this.__isNotEmpty(t);i&&!e&&(this.slotFactory=()=>document.createElement("div"),e=this.attachDefaultNode(),this.__updateHelperId(e),this.__observeHelper(e)),e&&(e.textContent=t),this.__toggleHasHelper(i)}__observeHelper(t){this.__helperObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateHelperId(e);else if(i||e.parentElement===this.node){const t=this.__hasHelper(this.node);this.__toggleHasHelper(t)}}))})),this.__helperObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasHelper(t){this.host.toggleAttribute("has-helper",t),this.dispatchEvent(new CustomEvent("helper-changed",{detail:{hasHelper:t,node:this.node}}))}__updateHelperId(t){t.id||(t.id=this.defaultId)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class Ar extends pr{constructor(t){super(t,"label",(()=>document.createElement("label")),((t,e)=>{this.__updateLabelId(e),this.__updateDefaultLabel(this.label),this.__observeLabel(e)}))}get labelId(){return this.node.id}initCustomNode(t){this.__updateLabelId(t);const e=this.__hasLabel(t);this.__toggleHasLabel(e)}teardownNode(t){this.__labelObserver&&this.__labelObserver.disconnect();let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e));const i=this.__hasLabel(e);this.__toggleHasLabel(i)}setLabel(t){this.label=t,this.__updateDefaultLabel(t)}__hasLabel(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__observeLabel(t){this.__labelObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateLabelId(e);else if(i||e.parentElement===this.node){const t=this.__hasLabel(this.node);this.__toggleHasLabel(t)}}))})),this.__labelObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasLabel(t){this.host.toggleAttribute("has-label",t),this.dispatchEvent(new CustomEvent("label-changed",{detail:{hasLabel:t,node:this.node}}))}__updateDefaultLabel(t){if(this.defaultNode&&(this.defaultNode.textContent=t,this.defaultNode===this.node)){const e=this.__isNotEmpty(t);this.__toggleHasLabel(e)}}__updateLabelId(t){t.id||(t.id=this.defaultId)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const Cr=Vt((t=>class extends(br(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}get _labelId(){return this._labelController.labelId}get _labelNode(){return this._labelController.node}constructor(){super(),this._labelController=new Ar(this),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Sr=Vt((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!this.required||!!this.value}})),Ir=t=>class extends(Sr(Cr(br(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}get _errorId(){return this._errorController.errorId}get _errorNode(){return this._errorController.node}get _helperId(){return this._helperController.helperId}get _helperNode(){return this._helperController.node}constructor(){super(),this._fieldAriaController=new Tr(this),this._helperController=new Er(this),this._errorController=new wr(this),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController),this._labelController.addEventListener("label-changed",(t=>{const{hasLabel:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("helper-changed",(t=>{const{hasHelper:e,node:i}=t.detail;this.__helperChanged(e,i)}))}__helperChanged(t,e){t?this._fieldAriaController.setHelperId(e.id):this._fieldAriaController.setHelperId(null)}__labelChanged(t,e){t?this._fieldAriaController.setLabelId(e.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{t?this._fieldAriaController.setErrorId(this._errorController.errorId):this._fieldAriaController.setErrorId(null)}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Pr=Vt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),kr=Vt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0}}}constructor(){super(),this._boundOnInput=this._onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}clear(){this.value=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this.inputElement.value=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_onInput(t){this.__userInput=t.isTrusted,this.value=t.target.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(""!==t&&null!=t),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}})),Lr=Vt((t=>class extends(Pr(Sr(kr(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(${this.constructor.constraints.join(", ")})`)}_constraintsChanged(...t){this.invalid&&(this._hasValidConstraints(t)?this.validate():this.invalid=!1)}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),Dr=t=>class extends(xr(Lr(Ir(mr(t))))){static get properties(){return{autoselect:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t)))}_onClearButtonClick(t){t.preventDefault(),this.inputElement.focus(),this.__clear()}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this.__clear())}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__clear(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Rr=t=>class extends(Dr(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String},_enabledCharPattern:{type:String,observer:"_enabledCharPatternChanged"}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_onBlur(t){super._onBlur(t),this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_forwardInputValue(t){super._forwardInputValue(t),this.invalid&&this.validate()}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){this._enabledCharPattern&&!this.__shouldAcceptKey(t)&&t.preventDefault(),super._onKeyDown(t)}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__enabledCharRegExp.test(t.key)}_onPaste(t){if(this._enabledCharPattern){const e=(t.clipboardData||window.clipboardData).getData("text");this.__enabledTextRegExp.test(e)||t.preventDefault()}}_onDrop(t){if(this._enabledCharPattern){const e=t.dataTransfer.getData("text");this.__enabledTextRegExp.test(e)||t.preventDefault()}}_onBeforeInput(t){this._enabledCharPattern&&t.data&&!this.__enabledTextRegExp.test(t.data)&&t.preventDefault()}_enabledCharPatternChanged(t){t&&(this.__enabledCharRegExp=new RegExp(`^${t}$`),this.__enabledTextRegExp=new RegExp(`^${t}*$`))}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */; +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class Or{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("label-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */const Br=t=>class extends(Lr(t)){static get properties(){return{pattern:{type:String},preventInvalidInput:{type:Boolean}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}_checkInputValue(){if(this.preventInvalidInput){const t=this.inputElement;t&&t.value.length>0&&!this.checkValidity()&&(t.value=this.value||"",this.setAttribute("input-prevented",""),this._inputDebouncer=rr.debounce(this._inputDebouncer,tr.after(200),(()=>{this.removeAttribute("input-prevented")})))}}_onInput(t){this._checkInputValue(),super._onInput(t)}} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Fr=n`[part=clear-button]{display:none;cursor:default}[part=clear-button]::before{content:'✕'}:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part=clear-button]{display:block}` +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */; +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +nt("vaadin-text-field",[n`:host{display:inline-flex;outline:0}:host::before{content:'\\2003';width:0;display:inline-block}:host([hidden]){display:none!important}:host(:not([has-label])) [part=label]{display:none}` +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,n`[class$=container]{display:flex;flex-direction:column;min-width:100%;max-width:100%;width:var(--vaadin-field-default-width,12em)}` +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd.. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Fr],{moduleId:"vaadin-text-field-styles"});class Nr extends(Br(Rr(ct(sr(Ei))))){static get is(){return"vaadin-text-field"}static get template(){return Mi` + + + + + + + + + + + + + + + + + + + + + + + + `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength"]}static get constraints(){return[...super.constraints,"maxlength","minlength"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new fr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Or(this.inputElement,this._labelController))}}customElements.define(Nr.is,Nr); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Ur=2,jr=2; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class Vr extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.it=R,t.type!==jr)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===R||null==t)return this.ft=void 0,this.it=t;if(t===D)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Vr.directiveName="unsafeHTML",Vr.resultType=1; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class $r extends Vr{}$r.directiveName="unsafeSVG",$r.resultType=2;const Gr=(t=>(...e)=>({_$litDirective$:t,values:e}))($r); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function qr(t){let e=R;if(t){const i=t.cloneNode(!0);i.removeAttribute("id"),e=L`${Gr(i.innerHTML)}`}return e}function Zr(t){let e=null==t||""===t?R:t;return function(t){return((t,e)=>{var i,r;return void 0===e?void 0!==(null===(i=t)||void 0===i?void 0:i._$litType$):(null===(r=t)||void 0===r?void 0:r._$litType$)===e})(t,Ur)||t===R}(e)||(console.error("[vaadin-icon] Invalid svg passed, please use Lit svg literal."),e=R),e} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Hr={};class Wr extends(sr(Ei)){static get template(){return null}static get is(){return"vaadin-iconset"}static get properties(){return{name:{type:String,observer:"__nameChanged"},size:{type:Number,value:24}}}static getIconset(t){let e=Hr[t];return e||(e=document.createElement("vaadin-iconset"),e.name=t,Hr[t]=e),e}connectedCallback(){super.connectedCallback(),this.style.display="none"}applyIcon(t){this._icons=this._icons||this.__createIconMap();const e=this._icons[this.__getIconId(t)];return{svg:qr(e),size:this.size,viewBox:e?e.getAttribute("viewBox"):null}}__createIconMap(){const t={};return this.querySelectorAll("[id]").forEach((e=>{t[this.__getIconId(e.id)]=e})),t}__getIconId(t){return(t||"").replace(`${this.name}:`,"")}__nameChanged(t,e){e&&(Hr[t]=Wr.getIconset(e),delete Hr[e]),t&&(Hr[t]=this,document.dispatchEvent(new CustomEvent("vaadin-iconset-registered",{detail:t})))}}customElements.define(Wr.is,Wr),nt("vaadin-icon",n` + :host { + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + `,{moduleId:"lumo-icon"});class Xr extends(ct(sr(Ei))){static get template(){return Mi` + + + `}static get is(){return"vaadin-icon"}static get properties(){return{icon:{type:String,observer:"__iconChanged"},svg:{type:Object},size:{type:Number,value:24},__svgElement:Object,__viewBox:String}}static get observers(){return["__svgChanged(svg, __svgElement)"]}constructor(){super(),this.__onIconsetRegistered=this.__onIconsetRegistered.bind(this)}ready(){super.ready(),this.__svgElement=this.shadowRoot.querySelector("svg")}__getIconsetName(t){if(!t)return;return t.split(":")[0]||"vaadin"}__onIconsetRegistered(t){t.detail===this.__getIconsetName(this.icon)&&this.__iconChanged(this.icon)}connectedCallback(){super.connectedCallback(),document.addEventListener("vaadin-iconset-registered",this.__onIconsetRegistered)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("vaadin-iconset-registered",this.__onIconsetRegistered)}__iconChanged(t){if(t){this.__checkDeprecatedIcon(t);const e=this.__getIconsetName(t),i=Wr.getIconset(e),{svg:r,size:n,viewBox:o}=i.applyIcon(t);o&&(this.__viewBox=o),n!==this.size&&(this.size=n),this.svg=r}else this.svg=Zr(null)}__checkDeprecatedIcon(t){const e={"vaadin:buss":"vaadin:bus","vaadin:funcion":"vaadin:function","vaadin:megafone":"vaadin:megaphone","vaadin:palete":"vaadin:palette","vaadin:trendind-down":"vaadin:trending-down"};t in e&&console.warn(`WARNING: The icon "${t}" is deprecated. Use "${e[t]}" instead`)}__svgChanged(t,e){e&&function(t,e){const i=Zr(t);B(i,e)}(t,e)}__computeViewBox(t,e){return e||`0 0 ${t} ${t}`}}customElements.define(Xr.is,Xr); +/** + * @license + * Copyright (c) 2015 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Yr=document.createElement("template");Yr.innerHTML='\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',document.head.appendChild(Yr.content),nt("vaadin-app-layout",n` + [part='navbar']::before { + background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)); + } + + :host(:not([dir='rtl']):not([overlay])) [part='drawer'] { + border-right: 1px solid var(--lumo-contrast-10pct); + } + + :host([dir='rtl']:not([overlay])) [part='drawer'] { + border-left: 1px solid var(--lumo-contrast-10pct); + } + + :host([overlay]) [part='drawer']::before { + background: var(--lumo-base-color); + } + + [part='navbar']::before, + :host([overlay]) [part='drawer']::before { + position: absolute; + content: ''; + width: 100%; + height: 100%; + z-index: -1; + } + + :host([overlay]) [part='drawer']::before { + background: var(--lumo-base-color); + height: var(--_vaadin-app-layout-drawer-scroll-size, 100%); + } + + [part='backdrop'] { + background-color: var(--lumo-shade-20pct); + opacity: 1; + } + + [part] ::slotted(h2), + [part] ::slotted(h3), + [part] ::slotted(h4) { + margin-top: var(--lumo-space-xs) !important; + margin-bottom: var(--lumo-space-xs) !important; + } + + @supports (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)) { + [part='navbar']::before { + opacity: 0.8; + } + + [part='navbar'] { + -webkit-backdrop-filter: blur(24px); + backdrop-filter: blur(24px); + } + + :host([overlay]) [part='drawer']::before { + opacity: 0.9; + } + + :host([overlay]) [part='drawer'] { + -webkit-backdrop-filter: blur(24px); + backdrop-filter: blur(24px); + } + } + `,{moduleId:"lumo-app-layout"});const Kr=document.createElement("template");Kr.innerHTML="\n \n",document.head.appendChild(Kr.content); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Jr=t=>t.test(navigator.userAgent),Qr=t=>t.test(navigator.platform);Jr(/Android/),Jr(/Chrome/)&&/Google Inc/.test(navigator.vendor),Jr(/Firefox/);const tn=Qr(/^iPad/)||Qr(/^Mac/)&&navigator.maxTouchPoints>1,en=Qr(/^iPhone/)||tn;Jr(/^((?!chrome|android).)*safari/i);const rn=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})(); +/** + * @license + * Copyright (c) 2018 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function nn(){if(en){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;e&&i>t?document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom",i-t+"px"):document.documentElement.style.setProperty("--vaadin-viewport-offset-bottom","")}}nn(),window.addEventListener("resize",nn); +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +let on=!1,an=[],sn=[];function ln(){on=!0,requestAnimationFrame((function(){on=!1,function(t){for(;t.length;)hn(t.shift())}(an),setTimeout((function(){!function(t){for(let e=0,i=t.length;e{throw t}))}}function cn(t,e,i){on||ln(),sn.push([t,e,i])} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function un(t,e){const i=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===i||0===r?r>i:i>r}function dn(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)un(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(dn(t.slice(0,i)),dn(t.slice(i)))}function pn(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let n=r>0;r>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{n=pn(t,e)||n})),n}function fn(t){return t.getRootNode().activeElement===t} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const mn=[];class vn{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");mn.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,mn.pop()}__onKeyDown(t){if(this.__trapNode&&this===Array.from(mn).pop()&&"Tab"===t.key){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e)}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,r=this.__focusedElementIndex;e[(e.length+r+i)%e.length].focus()}get __focusableElements(){return function(t){const e=[];return pn(t,e)?dn(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(fn).pop())}} +/** + * @license + * Copyright (c) 2018 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */class _n extends(sr(ct(br(Ei)))){static get template(){return Mi` + + + + + + + + + + + + + + + + `}static get is(){return"vaadin-app-layout"}static get properties(){return{i18n:{type:Object,observer:"__i18nChanged",value:()=>({drawer:"Drawer"})},primarySection:{type:String,value:"navbar",notify:!0,reflectToAttribute:!0,observer:"__primarySectionChanged"},drawerOpened:{type:Boolean,notify:!0,value:!0,reflectToAttribute:!0,observer:"__drawerOpenedChanged"},overlay:{type:Boolean,notify:!0,readOnly:!0,value:!1,reflectToAttribute:!0},closeDrawerOn:{type:String,value:"vaadin-router-location-changed",observer:"_closeDrawerOnChanged"}}}static dispatchCloseOverlayDrawerEvent(){window.dispatchEvent(new CustomEvent("close-overlay-drawer"))}constructor(){super(),this.__boundResizeListener=this._resize.bind(this),this.__drawerToggleClickListener=this._drawerToggleClick.bind(this),this.__closeOverlayDrawerListener=this.__closeOverlayDrawer.bind(this),this.__trapFocusInDrawer=this.__trapFocusInDrawer.bind(this),this.__releaseFocusFromDrawer=this.__releaseFocusFromDrawer.bind(this),this.__focusTrapController=new vn(this)}connectedCallback(){var t,e,i;super.connectedCallback(),this._blockAnimationUntilAfterNextRender(),window.addEventListener("resize",this.__boundResizeListener),this.addEventListener("drawer-toggle-click",this.__drawerToggleClickListener),t=this,e=this._afterFirstRender,on||ln(),an.push([t,e,i]),this._updateTouchOptimizedMode();const r=this.$.navbarTop.firstElementChild;this._navbarChildObserver=new dr(r,(()=>{this._updateTouchOptimizedMode()})),this._touchChildObserver=new dr(this.$.touchSlot,(()=>{this._updateTouchOptimizedMode()})),this._drawerChildObserver=new dr(this.$.drawerSlot,(()=>{this._updateDrawerSize()})),this._updateDrawerSize(),this._updateOverlayMode(),window.addEventListener("close-overlay-drawer",this.__closeOverlayDrawerListener)}ready(){super.ready(),this.addController(this.__focusTrapController),this.__setAriaExpanded()}disconnectedCallback(){super.disconnectedCallback(),this._navbarChildObserver&&this._navbarChildObserver.disconnect(),this._drawerChildObserver&&this._drawerChildObserver.disconnect(),this._touchChildObserver&&this._touchChildObserver.disconnect(),window.removeEventListener("resize",this.__boundResizeListener),this.removeEventListener("drawer-toggle-click",this.__drawerToggleClickListener),window.removeEventListener("close-overlay-drawer",this.__drawerToggleClickListener)}__primarySectionChanged(t){["navbar","drawer"].includes(t)||this.set("primarySection","navbar")}__drawerOpenedChanged(t,e){this.overlay&&(t?(this._updateDrawerHeight(),this.__trapFocusInDrawer()):e&&this.__releaseFocusFromDrawer()),this.__setAriaExpanded()}__i18nChanged(){this.__updateDrawerAriaAttributes()}_afterFirstRender(){this._blockAnimationUntilAfterNextRender(),this._updateOffsetSize()}_drawerToggleClick(t){t.stopPropagation(),this.drawerOpened=!this.drawerOpened}__closeOverlayDrawer(){this.overlay&&(this.drawerOpened=!1)}__setAriaExpanded(){const t=this.querySelector("vaadin-drawer-toggle");t&&t.setAttribute("aria-expanded",this.drawerOpened)}_updateDrawerSize(){const t=this.querySelectorAll("[slot=drawer]").length,e=this.$.drawer;0===t?e.setAttribute("hidden",""):e.removeAttribute("hidden"),this._updateOffsetSize()}_resize(){this._blockAnimationUntilAfterNextRender(),this._updateTouchOptimizedMode(),this._updateOverlayMode()}_updateOffsetSize(){const t=this.$.navbarTop.getBoundingClientRect(),e=this.$.navbarBottom.getBoundingClientRect();this.style.setProperty("--_vaadin-app-layout-navbar-offset-size",`${t.height}px`),this.style.setProperty("--_vaadin-app-layout-navbar-offset-size-bottom",`${e.height}px`);const i=this.$.drawer.getBoundingClientRect();this.style.setProperty("--_vaadin-app-layout-drawer-offset-size",`${i.width}px`)}_updateDrawerHeight(){const{scrollHeight:t,offsetHeight:e}=this.$.drawer,i=t>e?`${t}px`:"100%";this.style.setProperty("--_vaadin-app-layout-drawer-scroll-size",i)}_updateOverlayMode(){const t="true"===this._getCustomPropertyValue("--vaadin-app-layout-drawer-overlay");!this.overlay&&t&&(this._drawerStateSaved=this.drawerOpened,this.drawerOpened=!1),this._setOverlay(t),!this.overlay&&this._drawerStateSaved&&(this.drawerOpened=this._drawerStateSaved,this._drawerStateSaved=null),this._updateDrawerHeight(),this.__updateDrawerAriaAttributes()}__updateDrawerAriaAttributes(){const t=this.$.drawer;this.overlay?(t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label",this.i18n.drawer)):(t.removeAttribute("role"),t.removeAttribute("aria-modal"),t.removeAttribute("aria-label"))}__drawerTransitionComplete(){return new Promise((t=>{"none"!==this._getCustomPropertyValue("--vaadin-app-layout-transition")?this.$.drawer.addEventListener("transitionend",t,{once:!0}):t()}))}async __trapFocusInDrawer(){await this.__drawerTransitionComplete(),this.drawerOpened&&(this.$.drawer.setAttribute("tabindex","0"),this.__focusTrapController.trapFocus(this.$.drawer))}async __releaseFocusFromDrawer(){if(await this.__drawerTransitionComplete(),this.drawerOpened)return;this.__focusTrapController.releaseFocus(),this.$.drawer.removeAttribute("tabindex");const t=this.querySelector("vaadin-drawer-toggle");t&&(t.focus(),t.setAttribute("focus-ring","focus"))}__onDrawerKeyDown(t){"Escape"===t.key&&this.overlay&&(this.drawerOpened=!1)}_closeDrawerOnChanged(t,e){e&&window.removeEventListener(e,this.__closeOverlayDrawerListener),t&&window.addEventListener(t,this.__closeOverlayDrawerListener)}_onBackdropClick(){this._close()}_onBackdropTouchend(t){t.preventDefault(),this._close()}_close(){this.drawerOpened=!1}_getCustomPropertyValue(t){return(getComputedStyle(this).getPropertyValue(t)||"").trim().toLowerCase()}_updateTouchOptimizedMode(){const t="true"===this._getCustomPropertyValue("--vaadin-app-layout-touch-optimized"),e=this.querySelectorAll('[slot*="navbar"]');e.length>0&&Array.from(e).forEach((e=>{e.getAttribute("slot").indexOf("touch-optimized")>-1&&(e.__touchOptimized=!0),t&&e.__touchOptimized?e.setAttribute("slot","navbar-bottom"):e.setAttribute("slot","navbar")})),0===this.$.navbarTop.querySelector("[name=navbar]").assignedNodes().length?this.$.navbarTop.setAttribute("hidden",""):this.$.navbarTop.removeAttribute("hidden"),t?this.$.navbarBottom.removeAttribute("hidden"):this.$.navbarBottom.setAttribute("hidden",""),this._updateOffsetSize()}_blockAnimationUntilAfterNextRender(){this.setAttribute("no-anim",""),cn(this,(()=>{this.removeAttribute("no-anim")}))}}customElements.define(_n.is,_n);const gn=n` + :host { + /* Sizing */ + --lumo-button-size: var(--lumo-size-m); + min-width: calc(var(--lumo-button-size) * 2); + height: var(--lumo-button-size); + padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2); + margin: var(--lumo-space-xs) 0; + box-sizing: border-box; + /* Style */ + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size-m); + font-weight: 500; + color: var(--_lumo-button-color, var(--lumo-primary-text-color)); + background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct)); + border-radius: var(--lumo-border-radius-m); + cursor: var(--lumo-clickable-cursor); + -webkit-tap-highlight-color: transparent; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + /* Set only for the internal parts so we don’t affect the host vertical alignment */ + [part='label'], + [part='prefix'], + [part='suffix'] { + line-height: var(--lumo-line-height-xs); + } + + [part='label'] { + padding: calc(var(--lumo-button-size) / 6) 0; + } + + :host([theme~='small']) { + font-size: var(--lumo-font-size-s); + --lumo-button-size: var(--lumo-size-s); + } + + :host([theme~='large']) { + font-size: var(--lumo-font-size-l); + --lumo-button-size: var(--lumo-size-l); + } + + /* For interaction states */ + :host::before, + :host::after { + content: ''; + /* We rely on the host always being relative */ + position: absolute; + z-index: 1; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: currentColor; + border-radius: inherit; + opacity: 0; + pointer-events: none; + } + + /* Hover */ + + @media (any-hover: hover) { + :host(:hover)::before { + opacity: 0.02; + } + } + + /* Active */ + + :host::after { + transition: opacity 1.4s, transform 0.1s; + filter: blur(8px); + } + + :host([active])::before { + opacity: 0.05; + transition-duration: 0s; + } + + :host([active])::after { + opacity: 0.1; + transition-duration: 0s, 0s; + transform: scale(0); + } + + /* Keyboard focus */ + + :host([focus-ring]) { + box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct); + } + + :host([theme~='primary'][focus-ring]) { + box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct); + } + + /* Types (primary, tertiary, tertiary-inline */ + + :host([theme~='tertiary']), + :host([theme~='tertiary-inline']) { + background-color: transparent !important; + min-width: 0; + } + + :host([theme~='tertiary']) { + padding: 0 calc(var(--lumo-button-size) / 6); + } + + :host([theme~='tertiary-inline'])::before { + display: none; + } + + :host([theme~='tertiary-inline']) { + margin: 0; + height: auto; + padding: 0; + line-height: inherit; + font-size: inherit; + } + + :host([theme~='tertiary-inline']) [part='label'] { + padding: 0; + overflow: visible; + line-height: inherit; + } + + :host([theme~='primary']) { + background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color)); + color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color)); + font-weight: 600; + min-width: calc(var(--lumo-button-size) * 2.5); + } + + :host([theme~='primary'])::before { + background-color: black; + } + + @media (any-hover: hover) { + :host([theme~='primary']:hover)::before { + opacity: 0.05; + } + } + + :host([theme~='primary'][active])::before { + opacity: 0.1; + } + + :host([theme~='primary'][active])::after { + opacity: 0.2; + } + + /* Colors (success, error, contrast) */ + + :host([theme~='success']) { + color: var(--lumo-success-text-color); + } + + :host([theme~='success'][theme~='primary']) { + background-color: var(--lumo-success-color); + color: var(--lumo-success-contrast-color); + } + + :host([theme~='error']) { + color: var(--lumo-error-text-color); + } + + :host([theme~='error'][theme~='primary']) { + background-color: var(--lumo-error-color); + color: var(--lumo-error-contrast-color); + } + + :host([theme~='contrast']) { + color: var(--lumo-contrast); + } + + :host([theme~='contrast'][theme~='primary']) { + background-color: var(--lumo-contrast); + color: var(--lumo-base-color); + } + + /* Disabled state. Keep selectors after other color variants. */ + + :host([disabled]) { + pointer-events: none; + color: var(--lumo-disabled-text-color); + } + + :host([theme~='primary'][disabled]) { + background-color: var(--lumo-contrast-30pct); + color: var(--lumo-base-color); + } + + :host([theme~='primary'][disabled]) [part] { + opacity: 0.7; + } + + /* Icons */ + + [part] ::slotted(vaadin-icon), + [part] ::slotted(iron-icon) { + display: inline-block; + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + + /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */ + [part] ::slotted(vaadin-icon[icon^='vaadin:']), + [part] ::slotted(iron-icon[icon^='vaadin:']) { + padding: 0.25em; + box-sizing: border-box !important; + } + + [part='prefix'] { + margin-left: -0.25em; + margin-right: 0.25em; + } + + [part='suffix'] { + margin-left: 0.25em; + margin-right: -0.25em; + } + + /* Icon-only */ + + :host([theme~='icon']:not([theme~='tertiary-inline'])) { + min-width: var(--lumo-button-size); + padding-left: calc(var(--lumo-button-size) / 4); + padding-right: calc(var(--lumo-button-size) / 4); + } + + :host([theme~='icon']) [part='prefix'], + :host([theme~='icon']) [part='suffix'] { + margin-left: 0; + margin-right: 0; + } + + /* RTL specific styles */ + + :host([dir='rtl']) [part='prefix'] { + margin-left: 0.25em; + margin-right: -0.25em; + } + + :host([dir='rtl']) [part='suffix'] { + margin-left: -0.25em; + margin-right: 0.25em; + } + + :host([dir='rtl'][theme~='icon']) [part='prefix'], + :host([dir='rtl'][theme~='icon']) [part='suffix'] { + margin-left: 0; + margin-right: 0; + } +`;nt("vaadin-button",gn,{moduleId:"lumo-button"});nt("vaadin-drawer-toggle",[gn,n` + :host { + width: var(--lumo-size-l); + height: var(--lumo-size-l); + min-width: auto; + margin: 0 var(--lumo-space-s); + padding: 0; + background: transparent; + } + + [part='icon'], + [part='icon']::after, + [part='icon']::before { + position: inherit; + height: auto; + width: auto; + background: transparent; + top: auto; + } + + [part='icon']::before { + font-family: lumo-icons; + font-size: var(--lumo-icon-size-m); + content: var(--lumo-icons-menu); + } +`],{moduleId:"lumo-drawer-toggle"}); +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +const yn="string"==typeof document.head.style.touchAction,xn="__polymerGestures",bn="__polymerGesturesHandled",wn="__polymerGesturesTouchAction",zn=["mousedown","mousemove","mouseup","click"],Mn=[0,1,4,2],Tn=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function En(t){return zn.indexOf(t)>-1}let An=!1;function Cn(t){En(t)}!function(){try{const t=Object.defineProperty({},"passive",{get(){An=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Sn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),In={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Pn(t){const e=t.type;if(!En(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Tn&&(e=Mn[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const kn={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ln(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Dn(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Rn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],On={},Bn=[];function Fn(t){const e=Rn(t);return e.length>0?e[0]:t.target}function Nn(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const r=i[e];if(!r)return;if(!t[bn]&&(t[bn]={},"touch"===e.slice(0,5))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(kn.touch.id=i.identifier),kn.touch.id!==i.identifier)return;yn||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)kn.touch.x=e.clientX,kn.touch.y=e.clientY,kn.touch.scrollDecided=!1;else if("touchmove"===i){if(kn.touch.scrollDecided)return;kn.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Rn(t);for(let t,r=0;rn:"pan-y"===i&&(r=n>o)),r?t.preventDefault():$n("track")}}(t)}const n=t[bn];if(!n.skip){for(let e,i=0;i-1&&e.reset&&e.reset();for(let i,o=0;o{t.style.touchAction=e}));t[wn]=e}(t,r.touchAction)}(t,e,i),!0)}function jn(t){Bn.push(t);for(let e=0;e$n(t)})}function qn(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const r=Math.abs(t.x-e),n=Math.abs(t.y-i);return r>=5||n>=5}function Zn(t,e,i){if(!e)return;const r=t.moves[t.moves.length-2],n=t.moves[t.moves.length-1],o=n.x-t.x,a=n.y-t.y;let s,l=0;r&&(s=n.x-r.x,l=n.y-r.y),Vn(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o,dy:a,ddx:s,ddy:l,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),r=i;for(;r&&r.shadowRoot&&!window.ShadyDOM;){const n=r;if(r=r.shadowRoot.elementFromPoint(t,e),n===r)break;r&&(i=r)}return i}(i.clientX,i.clientY)})}function Hn(t,e,i){const r=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y),o=Fn(i||e);!o||In[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(n)||r<=25&&n<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Fn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),r=t.pageX,n=t.pageY;return!(r>=i.left&&r<=i.right&&n>=i.top&&n<=i.bottom)}return!1}(e))&&(t.prevent||Vn(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))} +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */jn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Dn(this.info)},mousedown(t){if(!Pn(t))return;const e=Fn(t),i=this;Ln(this.info,(t=>{Pn(t)||(Gn("up",e,t),Dn(i.info))}),(t=>{Pn(t)&&Gn("up",e,t),Dn(i.info)})),Gn("down",e,t)},touchstart(t){Gn("down",Fn(t),t.changedTouches[0],t)},touchend(t){Gn("up",Fn(t),t.changedTouches[0],t)}}),jn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Dn(this.info)},mousedown(t){if(!Pn(t))return;const e=Fn(t),i=this,r=t=>{const r=t.clientX,n=t.clientY;qn(i.info,r,n)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&$n("tap"),i.info.addMove({x:r,y:n}),Pn(t)||(i.info.state="end",Dn(i.info)),e&&Zn(i.info,e,t),i.info.started=!0)};Ln(this.info,r,(t=>{i.info.started&&r(t),Dn(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Fn(t),i=t.changedTouches[0],r=i.clientX,n=i.clientY;qn(this.info,r,n)&&("start"===this.info.state&&$n("tap"),this.info.addMove({x:r,y:n}),Zn(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Fn(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Zn(this.info,e,i))}}),jn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){Pn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Pn(t)&&Hn(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Hn(this.info,t.changedTouches[0],t)}});const Wn=t=>class extends(gr(mr(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Un(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Un(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&this._setActive(!0)}_onKeyUp(t){super._onKeyUp(t),this._activeKeys.includes(t.key)&&this._setActive(!1)}_setActive(t){this.toggleAttribute("active",t)}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */,Xn=t=>class extends(Wn(yr(_r(t)))){static get properties(){return{tabindex:{value:0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class Yn extends(Xn(sr(ct(Ei)))){static get is(){return"vaadin-button"}static get template(){return Mi` + + + + + + + + + + + + + `}}customElements.define(Yn.is,Yn); +/** + * @license + * Copyright (c) 2018 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +class Kn extends Yn{static get template(){return Mi` + + + + + `}static get is(){return"vaadin-drawer-toggle"}static get properties(){return{ariaLabel:{type:String,value:"Toggle navigation panel",reflectToAttribute:!0}}}constructor(){super(),this.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("drawer-toggle-click",{bubbles:!0,composed:!0}))}))}}customElements.define(Kn.is,Kn),nt("vaadin-tab",n` + :host { + box-sizing: border-box; + padding: 0.5rem 0.75rem; + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size-m); + line-height: var(--lumo-line-height-xs); + font-weight: 500; + opacity: 1; + color: var(--lumo-secondary-text-color); + transition: 0.15s color, 0.2s transform; + flex-shrink: 0; + display: flex; + align-items: center; + position: relative; + cursor: var(--lumo-clickable-cursor); + transform-origin: 50% 100%; + outline: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow: hidden; + min-width: var(--lumo-size-m); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + :host(:not([orientation='vertical'])) { + text-align: center; + } + + :host([orientation='vertical']) { + transform-origin: 0% 50%; + padding: 0.25rem 1rem; + min-height: var(--lumo-size-m); + min-width: 0; + } + + :host(:hover), + :host([focus-ring]) { + color: var(--lumo-body-text-color); + } + + :host([selected]) { + color: var(--lumo-primary-text-color); + transition: 0.6s color; + } + + :host([active]:not([selected])) { + color: var(--lumo-primary-text-color); + transition-duration: 0.1s; + } + + :host::before, + :host::after { + content: ''; + position: absolute; + display: var(--_lumo-tab-marker-display, block); + bottom: 0; + left: 50%; + width: var(--lumo-size-s); + height: 2px; + background-color: var(--lumo-contrast-60pct); + border-radius: var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0 0; + transform: translateX(-50%) scale(0); + transform-origin: 50% 100%; + transition: 0.14s transform cubic-bezier(0.12, 0.32, 0.54, 1); + will-change: transform; + } + + :host([selected])::before, + :host([selected])::after { + background-color: var(--lumo-primary-color); + } + + :host([orientation='vertical'])::before, + :host([orientation='vertical'])::after { + left: 0; + bottom: 50%; + transform: translateY(50%) scale(0); + width: 2px; + height: var(--lumo-size-xs); + border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0; + transform-origin: 100% 50%; + } + + :host::after { + box-shadow: 0 0 0 4px var(--lumo-primary-color); + opacity: 0.15; + transition: 0.15s 0.02s transform, 0.8s 0.17s opacity; + } + + :host([selected])::before, + :host([selected])::after { + transform: translateX(-50%) scale(1); + transition-timing-function: cubic-bezier(0.12, 0.32, 0.54, 1.5); + } + + :host([orientation='vertical'][selected])::before, + :host([orientation='vertical'][selected])::after { + transform: translateY(50%) scale(1); + } + + :host([selected]:not([active]))::after { + opacity: 0; + } + + :host(:not([orientation='vertical'])) ::slotted(a[href]) { + justify-content: center; + } + + :host ::slotted(a) { + display: flex; + width: 100%; + align-items: center; + height: 100%; + margin: -0.5rem -0.75rem; + padding: 0.5rem 0.75rem; + outline: none; + + /* + Override the CSS inherited from \`lumo-color\` and \`lumo-typography\`. + Note: \`!important\` is needed because of the \`:slotted\` specificity. + */ + text-decoration: none !important; + color: inherit !important; + } + + :host ::slotted(vaadin-icon), + :host ::slotted(iron-icon) { + margin: 0 4px; + width: var(--lumo-icon-size-m); + height: var(--lumo-icon-size-m); + } + + /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */ + :host ::slotted(vaadin-icon[icon^='vaadin:']), + :host ::slotted(iron-icon[icon^='vaadin:']) { + padding: 0.25rem; + box-sizing: border-box !important; + } + + :host(:not([dir='rtl'])) ::slotted(vaadin-icon:first-child), + :host(:not([dir='rtl'])) ::slotted(iron-icon:first-child) { + margin-left: 0; + } + + :host(:not([dir='rtl'])) ::slotted(vaadin-icon:last-child), + :host(:not([dir='rtl'])) ::slotted(iron-icon:last-child) { + margin-right: 0; + } + + :host([theme~='icon-on-top']) { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + text-align: center; + padding-bottom: 0.5rem; + padding-top: 0.25rem; + } + + :host([theme~='icon-on-top']) ::slotted(a) { + flex-direction: column; + align-items: center; + margin-top: -0.25rem; + padding-top: 0.25rem; + } + + :host([theme~='icon-on-top']) ::slotted(vaadin-icon), + :host([theme~='icon-on-top']) ::slotted(iron-icon) { + margin: 0; + } + + /* Disabled */ + + :host([disabled]) { + pointer-events: none; + opacity: 1; + color: var(--lumo-disabled-text-color); + } + + /* Focus-ring */ + + :host([focus-ring]) { + box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct); + border-radius: var(--lumo-border-radius-m); + } + + /* RTL specific styles */ + + :host([dir='rtl'])::before, + :host([dir='rtl'])::after { + left: auto; + right: 50%; + transform: translateX(50%) scale(0); + } + + :host([dir='rtl'][selected]:not([orientation='vertical']))::before, + :host([dir='rtl'][selected]:not([orientation='vertical']))::after { + transform: translateX(50%) scale(1); + } + + :host([dir='rtl']) ::slotted(vaadin-icon:first-child), + :host([dir='rtl']) ::slotted(iron-icon:first-child) { + margin-right: 0; + } + + :host([dir='rtl']) ::slotted(vaadin-icon:last-child), + :host([dir='rtl']) ::slotted(iron-icon:last-child) { + margin-left: 0; + } + + :host([orientation='vertical'][dir='rtl']) { + transform-origin: 100% 50%; + } + + :host([dir='rtl'][orientation='vertical'])::before, + :host([dir='rtl'][orientation='vertical'])::after { + left: auto; + right: 0; + border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s); + transform-origin: 0% 50%; + } + `,{moduleId:"lumo-tab"}); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const Jn=t=>class extends(Wn(_r(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class Qn extends(sr(ct(Jn(Ei)))){static get template(){return Mi` + + + `}static get is(){return"vaadin-tab"}ready(){super.ready(),this.setAttribute("role","tab")}_onKeyUp(t){const e=this.hasAttribute("active");if(super._onKeyUp(t),e){const t=this.querySelector("a");t&&t.click()}}}customElements.define(Qn.is,Qn),nt("vaadin-tabs",n` + :host { + -webkit-tap-highlight-color: transparent; + } + + :host(:not([orientation='vertical'])) { + box-shadow: inset 0 -1px 0 0 var(--lumo-contrast-10pct); + position: relative; + min-height: var(--lumo-size-l); + } + + :host([orientation='horizontal']) [part='tabs'] ::slotted(vaadin-tab:not([theme~='icon-on-top'])) { + justify-content: center; + } + + :host([orientation='vertical']) { + box-shadow: -1px 0 0 0 var(--lumo-contrast-10pct); + } + + :host([orientation='horizontal']) [part='tabs'] { + margin: 0 0.75rem; + } + + :host([orientation='vertical']) [part='tabs'] { + width: 100%; + margin: 0.5rem 0; + } + + [part='forward-button'], + [part='back-button'] { + position: absolute; + z-index: 1; + font-family: lumo-icons; + color: var(--lumo-tertiary-text-color); + font-size: var(--lumo-icon-size-m); + display: flex; + align-items: center; + justify-content: center; + width: 1.5em; + height: 100%; + transition: 0.2s opacity; + top: 0; + } + + [part='forward-button']:hover, + [part='back-button']:hover { + color: inherit; + } + + :host(:not([dir='rtl'])) [part='forward-button'] { + right: 0; + } + + [part='forward-button']::after { + content: var(--lumo-icons-angle-right); + } + + [part='back-button']::after { + content: var(--lumo-icons-angle-left); + } + + /* Tabs overflow */ + + [part='tabs'] { + --_lumo-tabs-overflow-mask-image: none; + -webkit-mask-image: var(--_lumo-tabs-overflow-mask-image); + mask-image: var(--_lumo-tabs-overflow-mask-image); + } + + /* Horizontal tabs overflow */ + + /* Both ends overflowing */ + :host([overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + 90deg, + transparent 2em, + #000 4em, + #000 calc(100% - 4em), + transparent calc(100% - 2em) + ); + } + + /* End overflowing */ + :host([overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 4em), transparent calc(100% - 2em)); + } + + /* Start overflowing */ + :host([overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent 2em, #000 4em); + } + + /* Vertical tabs overflow */ + + /* Both ends overflowing */ + :host([overflow~='start'][overflow~='end'][orientation='vertical']) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em, #000 calc(100% - 2em), transparent); + } + + /* End overflowing */ + :host([overflow~='end'][orientation='vertical']) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(#000 calc(100% - 2em), transparent); + } + + /* Start overflowing */ + :host([overflow~='start'][orientation='vertical']) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(transparent, #000 2em); + } + + :host [part='tabs'] ::slotted(:not(vaadin-tab)) { + margin-left: var(--lumo-space-m); + } + + /* Centered */ + + :host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:first-of-type) { + margin-inline-start: auto; + } + + :host([theme~='centered'][orientation='horizontal']) ::slotted(vaadin-tab:last-of-type) { + margin-inline-end: auto; + } + + /* Small */ + + :host([theme~='small']), + :host([theme~='small']) [part='tabs'] { + min-height: var(--lumo-size-m); + } + + :host([theme~='small']) [part='tabs'] ::slotted(vaadin-tab) { + font-size: var(--lumo-font-size-s); + } + + /* Minimal */ + + :host([theme~='minimal']) { + box-shadow: none; + --_lumo-tab-marker-display: none; + } + + /* Hide-scroll-buttons */ + + :host([theme~='hide-scroll-buttons']) [part='back-button'], + :host([theme~='hide-scroll-buttons']) [part='forward-button'] { + display: none; + } + + /* prettier-ignore */ + :host([theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + 90deg, + transparent, + #000 2em, + #000 calc(100% - 2em), + transparent 100% + ); + } + + :host([theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, #000 calc(100% - 2em), transparent 100%); + } + + :host([theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(90deg, transparent, #000 2em); + } + + /* Equal-width tabs */ + :host([theme~='equal-width-tabs']) { + flex: auto; + } + + :host([theme~='equal-width-tabs']) [part='tabs'] ::slotted(vaadin-tab) { + flex: 1 0 0%; + } + + /* RTL specific styles */ + + :host([dir='rtl']) [part='forward-button']::after { + content: var(--lumo-icons-angle-left); + } + + :host([dir='rtl']) [part='back-button']::after { + content: var(--lumo-icons-angle-right); + } + + :host([orientation='vertical'][dir='rtl']) { + box-shadow: 1px 0 0 0 var(--lumo-contrast-10pct); + } + + :host([dir='rtl']) [part='forward-button'] { + left: 0; + } + + :host([dir='rtl']) [part='tabs'] ::slotted(:not(vaadin-tab)) { + margin-left: 0; + margin-right: var(--lumo-space-m); + } + + /* Both ends overflowing */ + :host([dir='rtl'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + -90deg, + transparent 2em, + #000 4em, + #000 calc(100% - 4em), + transparent calc(100% - 2em) + ); + } + + /* End overflowing */ + :host([dir='rtl'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 4em), transparent calc(100% - 2em)); + } + + /* Start overflowing */ + :host([dir='rtl'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent 2em, #000 4em); + } + + :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start'][overflow~='end']:not([orientation='vertical'])) + [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient( + -90deg, + transparent, + #000 2em, + #000 calc(100% - 2em), + transparent 100% + ); + } + + :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='end']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, #000 calc(100% - 2em), transparent 100%); + } + + :host([dir='rtl'][theme~='hide-scroll-buttons'][overflow~='start']:not([orientation='vertical'])) [part='tabs'] { + --_lumo-tabs-overflow-mask-image: linear-gradient(-90deg, transparent, #000 2em); + } + `,{moduleId:"lumo-tabs"}); +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const to=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))})),eo=Vt((t=>class extends t{connectedCallback(){if(super.connectedCallback(),to.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,to.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),to.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&to.unobserve(t)),this.__parent=null}}get _observeParent(){return!1}_onResize(t){}notifyResize(){console.warn("WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.")}})),io=t=>class extends t{static get properties(){return{_hasVaadinListMixin:{value:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}ready(){super.ready(),this.addEventListener("keydown",(t=>this._onKeydown(t))),this.addEventListener("click",(t=>this._onClick(t))),this._observer=new dr(this,(()=>{this._setItems(this._filterItems(Array.from(this.children)))}))}_enhanceItems(t,e,i,r){if(!r&&t){this.setAttribute("aria-orientation",e||"vertical"),this.items.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i||0);const r=t[i];t.forEach((t=>t.selected=t===r)),r&&!r.disabled&&this._scrollToItem(i)}}get focused(){return this.getRootNode().activeElement}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){this._searchReset=rr.debounce(this._searchReset,tr.after(500),(()=>this._searchBuf="")),this._searchBuf+=e.toLowerCase();this.items.some((t=>0===t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().indexOf(this._searchBuf)))||(this._searchBuf=e.toLowerCase());const i=1===this._searchBuf.length?t+1:t;return this._getAvailableIndex(i,1,(t=>!(t.disabled||this._isItemHidden(t))&&0===t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().indexOf(this._searchBuf)))}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}_onKeydown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[a-zA-Z0-9]/.test(e)&&1===e.length){const t=this._searchKey(i,e);return void(t>=0&&this._focus(t))}let r,n;const o=this._isRTL?-1:1;this._vertical&&"ArrowUp"===e||!this._vertical&&"ArrowLeft"===e?(n=-o,r=i-o):this._vertical&&"ArrowDown"===e||!this._vertical&&"ArrowRight"===e?(n=o,r=i+o):"Home"===e?(n=1,r=0):"End"===e&&(n=-1,r=this.items.length-1),r=this._getAvailableIndex(r,n,(t=>!(t.disabled||this._isItemHidden(t)))),r>=0&&(this._focus(r),t.preventDefault())}_getAvailableIndex(t,e,i){const r=this.items.length;for(let n=0;"number"==typeof t&&n=r&&(t=0);if(i(this.items[t]))return t}return-1}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(t,1,(t=>!t.disabled));const e=this.items[t];this.items.forEach((t=>t.tabIndex=t===e?0:-1))}_focus(t){const e=this.items[t];this.items.forEach((t=>t.focused=t===e)),this._setFocusable(t),this._scrollToItem(t),this._focusItem(e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}focus(){this._observer&&this._observer.flush();const t=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);this._focusItem(t)}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[t+1]||e).getBoundingClientRect(),o=(this.items[t-1]||e).getBoundingClientRect();let a=0;!this._isRTL&&n[i[1]]>=r[i[1]]||this._isRTL&&n[i[1]]<=r[i[1]]?a=n[i[1]]-r[i[1]]:(!this._isRTL&&o[i[0]]<=r[i[0]]||this._isRTL&&o[i[0]]>=r[i[0]])&&(a=o[i[0]]-r[i[0]]),this._scroll(a)}get _vertical(){return"horizontal"!==this.orientation}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=Ai.detectScrollType(),r=Ai.getNormalizedScrollLeft(i,e,this._scrollerElement)+t;Ai.setNormalizedScrollLeft(i,e,this._scrollerElement,r)}}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;class ro extends(eo(sr(io(ct(Ei))))){static get template(){return Mi` + + + + + + + + + `}static get is(){return"vaadin-tabs"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["__tabsItemsChanged(items, items.*)"]}constructor(){super(),this.__itemsResizeObserver=new ResizeObserver((()=>{setTimeout((()=>this._updateOverflow()))}))}ready(){super.ready(),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),cn(this,(()=>{this._updateOverflow()}))}_onResize(){this._updateOverflow()}__tabsItemsChanged(t){this.__itemsResizeObserver.disconnect(),(t||[]).forEach((t=>{this.__itemsResizeObserver.observe(t)})),this._updateOverflow()}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement),e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;let i=t>0?"start":"";i+=t+this._scrollOffset"start"===t?"end":"start"))),i?this.setAttribute("overflow",i.trim()):this.removeAttribute("overflow")}}customElements.define(ro.is,ro); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +const no=n` + :host { + top: var(--lumo-space-m); + right: var(--lumo-space-m); + bottom: var(--lumo-space-m); + left: var(--lumo-space-m); + /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */ + /* stylelint-disable-next-line */ + outline: 0px solid transparent; + } + + [part='overlay'] { + background-color: var(--lumo-base-color); + background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct)); + border-radius: var(--lumo-border-radius-m); + box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m); + color: var(--lumo-body-text-color); + font-family: var(--lumo-font-family); + font-size: var(--lumo-font-size-m); + font-weight: 400; + line-height: var(--lumo-line-height-m); + letter-spacing: 0; + text-transform: none; + -webkit-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + [part='content'] { + padding: var(--lumo-space-xs); + } + + [part='backdrop'] { + background-color: var(--lumo-shade-20pct); + animation: 0.2s lumo-overlay-backdrop-enter both; + will-change: opacity; + } + + @keyframes lumo-overlay-backdrop-enter { + 0% { + opacity: 0; + } + } + + :host([closing]) [part='backdrop'] { + animation: 0.2s lumo-overlay-backdrop-exit both; + } + + @keyframes lumo-overlay-backdrop-exit { + 100% { + opacity: 0; + } + } + + @keyframes lumo-overlay-dummy-animation { + 0% { + opacity: 1; + } + + 100% { + opacity: 1; + } + } +`; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +function oo(t,e,i,r,n){let o;n&&(o="object"==typeof i&&null!==i,o&&(r=t.__dataTemp[e]));let a=r!==i&&(r==r||i==i);return o&&a&&(t.__dataTemp[e]=i),a}nt("",no,{moduleId:"lumo-overlay"}),nt("vaadin-overlay",no,{moduleId:"lumo-vaadin-overlay"});const ao=Vt((t=>class extends t{_shouldPropertyChange(t,e,i){return oo(this,t,e,i,!0)}}));Vt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return oo(this,t,e,i,this.mutableData)}})),ao._mutablePropertyChange=oo; +/** +@license +Copyright (c) 2017 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +let so=null;function lo(){return so}lo.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:lo,writable:!0}});const ho=vi(lo),co=ao(ho);const uo=vi(class{});class po extends uo{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i can only be templatized once");t.__templatizeOwner=e;let r=(e?e.constructor:po)._parseTemplate(t),n=r.templatizeInstanceClass;n||(n=vo(t,r,i),r.templatizeInstanceClass=n);const o=mo(t);_o(t,r,i,o);let a=class extends n{};return a.prototype._methodHost=o,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=r.hostProps,a}class bo extends(ct(ki(br(Ei)))){static get template(){return Mi` + + + + + + + + + `}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new dr(this,(t=>{this._setTemplateFromNodes(t.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),en&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new vn(this)}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addController(this.__focusTrapController)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;e&&i>t?this.style.setProperty("--vaadin-overlay-viewport-bottom",i-t+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_setTemplateFromNodes(t){this.template=t.filter((t=>t.localName&&"template"===t.localName))[0]||this.template}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_ironOverlayCanceled(t){t.preventDefault()}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(t,e){this._instance||this._ensureTemplatized(),t?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),cn(this,(()=>{this.focusTrap&&this.__focusTrapController.trapFocus(this.$.overlay);const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this.focusTrap&&this.__focusTrapController.releaseFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(t,e){const i=`__${t}Handler`,r=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",r),delete this[i])};this[i]=r,this.addEventListener("animationend",r)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")}_finishClosing(){document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing")}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){this._exitModalState();const t=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&t){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&setTimeout((()=>t.focus())),this.__restoreFocusNode=null}this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((t=>t instanceof bo&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===bo.__attachedInstances.pop()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),bo.__attachedInstances.forEach((t=>{t!==this&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=bo.__attachedInstances;let e;for(;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((t=>{t.parentNode===this.content&&this.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(t){this._removeOldContent(),t._Templatizer||(t._Templatizer=xo(t,this,{forwardHostProp(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new t._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const e=t._templateRoot||(t._templateRoot=t.getRootNode());if(e!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(e.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"");if(t=t.replace(/:host/g,":host-nomatch"),t){const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(t,e,i,r){t!==e?this.template=void 0:i!==r&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i,r,n){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const o=this._oldOwner!==i||this._oldModel!==r;this._oldModel=r,this._oldOwner=i;const a=this._oldTemplate!==t;this._oldTemplate=t;const s=this._oldRenderer!==e;this._oldRenderer=e;const l=this._oldOpened!==n;this._oldOpened=n,s&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),t&&a?this._stampOverlayTemplate(t):e&&(s||l||o)&&n&&this.requestContentUpdate()}_getActiveElement(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}bringToFront(){let t="";const e=bo.__attachedInstances.filter((t=>t!==this)).pop();if(e){t=e.__zIndex+1}this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(bo.is,bo); +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +function wo(t){return t.touches?t.touches[0]:t}function zo(t){return t.clientX>=0&&t.clientX<=window.innerWidth&&t.clientY>=0&&t.clientY<=window.innerHeight} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */nt("vaadin-dialog-overlay",[no,n` + /* Optical centering */ + :host::before, + :host::after { + content: ''; + flex-basis: 0; + flex-grow: 1; + } + + :host::after { + flex-grow: 1.1; + } + + [part='overlay'] { + border-radius: var(--lumo-border-radius-l); + box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-xl); + background-image: none; + outline: none; + -webkit-tap-highlight-color: transparent; + } + + [part='content'] { + padding: var(--lumo-space-l); + } + + :host(:is([has-header], [has-title])) [part='header'] + [part='content'] { + padding-top: 0; + } + + [part='header'], + [part='header-content'], + [part='footer'] { + gap: var(--lumo-space-xs) var(--lumo-space-s); + line-height: var(--lumo-line-height-s); + } + + [part='header'] { + padding: var(--lumo-space-m); + background-color: var(--lumo-base-color); + border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */ + } + + [part='footer'] { + padding: var(--lumo-space-s) var(--lumo-space-m); + background-color: var(--lumo-contrast-5pct); + border-radius: 0 0 var(--lumo-border-radius-l) var(--lumo-border-radius-l); /* Needed for Safari */ + } + + [part='title'] { + font-size: var(--lumo-font-size-xl); + font-weight: 600; + color: var(--lumo-header-text-color); + margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m)); + } + + /* No padding */ + :host([theme~='no-padding']) [part='content'] { + padding: 0; + } + + @media (min-height: 320px) { + :host([overflow~='top']) [part='header'] { + box-shadow: 0 1px 0 0 var(--lumo-contrast-10pct); + } + } + + /* Animations */ + + :host([opening]), + :host([closing]) { + animation: 0.25s lumo-overlay-dummy-animation; + } + + :host([opening]) [part='overlay'] { + animation: 0.12s 0.05s vaadin-dialog-enter cubic-bezier(0.215, 0.61, 0.355, 1) both; + } + + @keyframes vaadin-dialog-enter { + 0% { + opacity: 0; + transform: scale(0.95); + } + } + + :host([closing]) [part='overlay'] { + animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both; + } + + :host([closing]) [part='backdrop'] { + animation-delay: 0.05s; + } + + @keyframes vaadin-dialog-exit { + 100% { + opacity: 0; + transform: scale(1.02); + } + } +`],{moduleId:"lumo-dialog"});const Mo=t=>class extends t{static get properties(){return{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},_touchDevice:{type:Boolean,value:rn},__dragHandleClassName:{type:String}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._startDrag=this._startDrag.bind(this),this._drag=this._drag.bind(this),this._stopDrag=this._stopDrag.bind(this),this.$.overlay.$.overlay.addEventListener("mousedown",this._startDrag),this.$.overlay.$.overlay.addEventListener("touchstart",this._startDrag)}_startDrag(t){if(!("touchstart"===t.type&&t.touches.length>1)&&this.draggable&&(0===t.button||t.touches)){const e=this.$.overlay.$.resizerContainer,i=t.target===e,r=t.offsetX>e.clientWidth||t.offsetY>e.clientHeight,n=t.target===this.$.overlay.$.content,o=t.composedPath().some(((t,e)=>{if(!t.classList)return!1;const i=t.classList.contains(this.__dragHandleClassName||"draggable"),r=t.classList.contains("draggable-leaf-only"),n=0===e;return r&&n||i&&(!r||n)}));if(i&&!r||n||o){o||t.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const e=wo(t);this._originalMouseCoords={top:e.pageY,left:e.pageX},window.addEventListener("mouseup",this._stopDrag),window.addEventListener("touchend",this._stopDrag),window.addEventListener("mousemove",this._drag),window.addEventListener("touchmove",this._drag),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}}_drag(t){const e=wo(t);if(zo(e)){const t=this._originalBounds.top+(e.pageY-this._originalMouseCoords.top),i=this._originalBounds.left+(e.pageX-this._originalMouseCoords.left);this.$.overlay.setBounds({top:t,left:i})}}_stopDrag(){window.removeEventListener("mouseup",this._stopDrag),window.removeEventListener("touchend",this._stopDrag),window.removeEventListener("mousemove",this._drag),window.removeEventListener("touchmove",this._drag)}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;nt("vaadin-dialog-overlay",n` + [part='overlay'] { + position: relative; + overflow: visible; + max-height: 100%; + display: flex; + } + + [part='content'] { + box-sizing: border-box; + height: 100%; + } + + .resizer-container { + overflow: auto; + flex-grow: 1; + border-radius: inherit; /* prevent child elements being drawn outside part=overlay */ + } + + [part='overlay'][style] .resizer-container { + min-height: 100%; + width: 100%; + } + + :host(:not([resizable])) .resizer { + display: none; + } + + :host([resizable]) [part='title'] { + cursor: move; + -webkit-user-select: none; + user-select: none; + } + + .resizer { + position: absolute; + height: 16px; + width: 16px; + } + + .resizer.edge { + height: 8px; + width: 8px; + top: -4px; + right: -4px; + bottom: -4px; + left: -4px; + } + + .resizer.edge.n { + width: auto; + bottom: auto; + cursor: ns-resize; + } + + .resizer.ne { + top: -4px; + right: -4px; + cursor: nesw-resize; + } + + .resizer.edge.e { + height: auto; + left: auto; + cursor: ew-resize; + } + + .resizer.se { + bottom: -4px; + right: -4px; + cursor: nwse-resize; + } + + .resizer.edge.s { + width: auto; + top: auto; + cursor: ns-resize; + } + + .resizer.sw { + bottom: -4px; + left: -4px; + cursor: nesw-resize; + } + + .resizer.edge.w { + height: auto; + right: auto; + cursor: ew-resize; + } + + .resizer.nw { + top: -4px; + left: -4px; + cursor: nwse-resize; + } + `,{moduleId:"vaadin-dialog-resizable-overlay-styles"});const To=t=>class extends t{static get properties(){return{resizable:{type:Boolean,value:!1,reflectToAttribute:!0}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._resizeListeners={start:{},resize:{},stop:{}},this._addResizeListeners()}_addResizeListeners(){["n","e","s","w","nw","ne","se","sw"].forEach((t=>{const e=document.createElement("div");this._resizeListeners.start[t]=e=>this._startResize(e,t),this._resizeListeners.resize[t]=e=>this._resize(e,t),this._resizeListeners.stop[t]=()=>this._stopResize(t),1===t.length&&e.classList.add("edge"),e.classList.add("resizer"),e.classList.add(t),e.addEventListener("mousedown",this._resizeListeners.start[t]),e.addEventListener("touchstart",this._resizeListeners.start[t]),this.$.overlay.$.resizerContainer.appendChild(e)}))}_startResize(t,e){if(!("touchstart"===t.type&&t.touches.length>1)&&(0===t.button||t.touches)){t.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const i=wo(t);this._originalMouseCoords={top:i.pageY,left:i.pageX},window.addEventListener("mousemove",this._resizeListeners.resize[e]),window.addEventListener("touchmove",this._resizeListeners.resize[e]),window.addEventListener("mouseup",this._resizeListeners.stop[e]),window.addEventListener("touchend",this._resizeListeners.stop[e]),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}_resize(t,e){const i=wo(t);if(zo(i)){const t=40;e.split("").forEach((e=>{switch(e){case"n":{const e=this._originalBounds.height-(i.pageY-this._originalMouseCoords.top),r=this._originalBounds.top+(i.pageY-this._originalMouseCoords.top);e>t&&this.$.overlay.setBounds({top:r,height:e});break}case"e":{const e=this._originalBounds.width+(i.pageX-this._originalMouseCoords.left);e>t&&this.$.overlay.setBounds({width:e});break}case"s":{const e=this._originalBounds.height+(i.pageY-this._originalMouseCoords.top);e>t&&this.$.overlay.setBounds({height:e});break}case"w":{const e=this._originalBounds.width-(i.pageX-this._originalMouseCoords.left),r=this._originalBounds.left+(i.pageX-this._originalMouseCoords.left);e>t&&this.$.overlay.setBounds({left:r,width:e});break}}}))}}_stopResize(t){window.removeEventListener("mousemove",this._resizeListeners.resize[t]),window.removeEventListener("touchmove",this._resizeListeners.resize[t]),window.removeEventListener("mouseup",this._resizeListeners.stop[t]),window.removeEventListener("touchend",this._resizeListeners.stop[t]),this.dispatchEvent(new CustomEvent("resize",{detail:this._getResizeDimensions()}))}_getResizeDimensions(){const t=this.$.overlay.$.resizerContainer.scrollTop,{width:e,height:i}=getComputedStyle(this.$.overlay.$.overlay),r=this.$.overlay.$.content;r.setAttribute("style","position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-sizing: content-box; height: auto;");const{width:n,height:o}=getComputedStyle(r);return r.removeAttribute("style"),this.$.overlay.$.resizerContainer.scrollTop=t,{width:e,height:i,contentWidth:n,contentHeight:o}}} +/** + * @license + * Copyright (c) 2017 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */;let Eo;nt("vaadin-dialog-overlay",n` + [part='header'], + [part='header-content'], + [part='footer'] { + display: flex; + align-items: center; + flex-wrap: wrap; + flex: none; + pointer-events: none; + z-index: 1; + } + + ::slotted([slot='header-content']), + ::slotted([slot='title']), + ::slotted([slot='footer']) { + display: contents; + pointer-events: auto; + } + + [part='header-content'] { + flex: 1; + } + + :host([has-title]) [part='header-content'], + [part='footer'] { + justify-content: flex-end; + } + + :host(:not([has-title]):not([has-header])) [part='header'], + :host(:not([has-header])) [part='header-content'], + :host(:not([has-title])) [part='title'], + :host(:not([has-footer])) [part='footer'] { + display: none !important; + } + + :host(:is([has-title], [has-header], [has-footer])) [part='content'] { + height: auto; + } + + @media (min-height: 320px) { + :host(:is([has-title], [has-header], [has-footer])) .resizer-container { + overflow: hidden; + display: flex; + flex-direction: column; + } + + :host(:is([has-title], [has-header], [has-footer])) [part='content'] { + flex: 1; + overflow: auto; + } + } + + /* + NOTE(platosha): Make some min-width to prevent collapsing of the content + taking the parent width, e. g., and such. + */ + [part='content'] { + min-width: 12em; /* matches the default width */ + } + + :host([has-bounds-set]) [part='overlay'] { + max-width: none; + } + `,{moduleId:"vaadin-dialog-overlay-styles"});class Ao extends bo{static get is(){return"vaadin-dialog-overlay"}static get template(){if(!Eo){Eo=super.template.cloneNode(!0);const t=Eo.content.querySelector('[part="content"]'),e=Eo.content.querySelector('[part="overlay"]'),i=document.createElement("section");i.id="resizerContainer",i.classList.add("resizer-container"),i.appendChild(t),e.appendChild(i);const r=document.createElement("header");r.setAttribute("part","header"),i.insertBefore(r,t);const n=document.createElement("div");n.setAttribute("part","title"),r.appendChild(n);const o=document.createElement("slot");o.setAttribute("name","title"),n.appendChild(o);const a=document.createElement("div");a.setAttribute("part","header-content"),r.appendChild(a);const s=document.createElement("slot");s.setAttribute("name","header-content"),a.appendChild(s);const l=document.createElement("footer");l.setAttribute("part","footer"),i.appendChild(l);const h=document.createElement("slot");h.setAttribute("name","footer"),l.appendChild(h)}return Eo}static get observers(){return["_headerFooterRendererChange(headerRenderer, footerRenderer, opened)","_headerTitleChanged(headerTitle, opened)"]}static get properties(){return{modeless:Boolean,withBackdrop:Boolean,headerTitle:String,headerRenderer:Function,footerRenderer:Function}}ready(){super.ready(),this.__resizeObserver=new ResizeObserver((()=>{this.__updateOverflow()})),this.__resizeObserver.observe(this.$.resizerContainer),this.$.content.addEventListener("scroll",(()=>{this.__updateOverflow()}))}__createContainer(t){const e=document.createElement("div");return e.setAttribute("slot",t),e}__clearContainer(t){t.innerHTML="",delete t._$litPart$}__initContainer(t,e){return t?this.__clearContainer(t):t=this.__createContainer(e),t}_headerFooterRendererChange(t,e,i){const r=this.__oldHeaderRenderer!==t;this.__oldHeaderRenderer=t;const n=this.__oldFooterRenderer!==e;this.__oldFooterRenderer=e;const o=this._oldOpenedFooterHeader!==i;this._oldOpenedFooterHeader=i,this.toggleAttribute("has-header",!!t),this.toggleAttribute("has-footer",!!e),r&&(t?this.headerContainer=this.__initContainer(this.headerContainer,"header-content"):this.headerContainer&&(this.headerContainer.remove(),this.headerContainer=null,this.__updateOverflow())),n&&(e?this.footerContainer=this.__initContainer(this.footerContainer,"footer"):this.footerContainer&&(this.footerContainer.remove(),this.footerContainer=null,this.__updateOverflow())),(t&&(r||o)||e&&(n||o))&&i&&this.requestContentUpdate()}_headerTitleChanged(t,e){this.toggleAttribute("has-title",!!t),e&&(t||this._oldHeaderTitle)&&this.requestContentUpdate(),this._oldHeaderTitle=t}_headerTitleRenderer(){this.headerTitle?(this.headerTitleElement||(this.headerTitleElement=document.createElement("span"),this.headerTitleElement.setAttribute("slot","title"),this.headerTitleElement.classList.add("draggable")),this.appendChild(this.headerTitleElement),this.headerTitleElement.textContent=this.headerTitle):this.headerTitleElement&&(this.headerTitleElement.remove(),this.headerTitleElement=null)}requestContentUpdate(){super.requestContentUpdate(),this.headerContainer&&(this.headerContainer.parentElement||this.appendChild(this.headerContainer),this.headerRenderer&&this.headerRenderer.call(this.owner,this.headerContainer,this.owner)),this.footerContainer&&(this.footerContainer.parentElement||this.appendChild(this.footerContainer),this.footerRenderer&&this.footerRenderer.call(this.owner,this.footerContainer,this.owner)),this._headerTitleRenderer(),this.__updateOverflow()}setBounds(t){const e=this.$.overlay,i={...t};"absolute"!==e.style.position&&(e.style.position="absolute",this.setAttribute("has-bounds-set",""),this.__forceSafariReflow());for(const t in i)"number"==typeof i[t]&&(i[t]=`${i[t]}px`);Object.assign(e.style,i)}getBounds(){const t=this.$.overlay.getBoundingClientRect(),e=this.getBoundingClientRect();return{top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height}}__forceSafariReflow(){const t=this.$.resizerContainer.scrollTop,e=this.$.overlay;e.style.display="block",requestAnimationFrame((()=>{e.style.display="",this.$.resizerContainer.scrollTop=t}))}__updateOverflow(){let t="";if(this.hasAttribute("has-header")||this.hasAttribute("has-footer")||this.headerTitle){const e=this.$.content;e.scrollTop>0&&(t+=" top"),e.scrollTop0&&this.getAttribute("overflow")!==e?this.setAttribute("overflow",e):0===e.length&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")}}customElements.define(Ao.is,Ao);class Co extends(it(sr(Mo(To(Ei))))){static get template(){return Mi` + + + + `}static get is(){return"vaadin-dialog"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},ariaLabel:{type:String,value:""},renderer:Function,headerTitle:String,headerRenderer:Function,footerRenderer:Function,modeless:{type:Boolean,value:!1}}}static get observers(){return["_openedChanged(opened)","_ariaLabelChanged(ariaLabel, headerTitle)","_rendererChanged(renderer, headerRenderer, footerRenderer)"]}ready(){ +/** + * @license + * Copyright (c) 2021 - 2022 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */ +var t;super.ready(),this.$.overlay.setAttribute("role","dialog"),this.$.overlay.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),this.$.overlay.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}requestContentUpdate(){this.$.overlay.requestContentUpdate()}_rendererChanged(t,e,i){this.$.overlay.setProperties({owner:this,renderer:t,headerRenderer:e,footerRenderer:i})}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),this.__restoreOpened=this.opened,this.opened=!1}_openedChanged(t){this.$.overlay.opened=t}_ariaLabelChanged(t,e){t||e?this.$.overlay.setAttribute("aria-label",t||e):this.$.overlay.removeAttribute("aria-label")}_onOverlayOpened(t){!1===t.detail.value&&(this.opened=!1)}_handleOutsideClick(t){this.noCloseOnOutsideClick&&t.preventDefault()}_handleEscPress(t){this.noCloseOnEsc&&t.preventDefault()}_bringOverlayToFront(){this.modeless&&this.$.overlay.bringToFront()}}customElements.define(Co.is,Co);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var So={exports:{}},Io=So.exports=function(){var t,e,i;function r(r,n){if(t)if(e){var o="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk); self.onerror = null;",a={};t(a),i=n(a),"undefined"!=typeof window&&window&&window.URL&&window.URL.createObjectURL&&(i.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else e=n;else t=n}return r(["exports"],(function(t){var e="undefined"!=typeof self?self:{},i=r;function r(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}r.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},r.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},r.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},r.prototype.solveCurveX=function(t,e){var i,r,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)(r=1))return r;for(;io?i=n:r=n,n=.5*(r-i)+i}return n},r.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,i=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),i=Math.sin(t),r=e*this.x-i*this.y,n=i*this.x+e*this.y;return this.x=r,this.y=n,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),n=e.x+i*(this.x-e.x)-r*(this.y-e.y),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};const a=Math.PI/180,s=180/Math.PI;function l(t){return t*a}function h(t){return t*s}const c=[[0,0],[1,0],[1,1],[0,1]];function u(t){const e=(t+45+360)%360,i=Math.round(e/90)%4;return c[i]}function d(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function p(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return{min:new n(e,i),max:new n(r,o)}}function f(t,e,i){let r=0;for(let n=0;n<2;++n){const o=i?i[n]:0;t[n]>o&&(r+=(t[n]-o)*(t[n]-o)),e[n]{e(t,((t,e)=>{t&&(o=t),n[a]=e,0==--r&&i(o,n)}))}))}function M(t){const e=[];for(const i in t)e.push(t[i]);return e}function T(t,e){const i=[];for(const r in t)r in e||i.push(r);return i}function E(t,...e){for(const i of e)for(const e in i)t[e]=i[e];return t}function A(t,e){const i={};for(let r=0;r>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}return t()}function P(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function k(t){return t<=1?1:Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function L(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function D(t,e){t.forEach((t=>{e[t]&&(e[t]=e[t].bind(e))}))}function R(t,e){return-1!==t.indexOf(e,t.length-e.length)}function O(t,e,i){const r={};for(const n in t)r[n]=e.call(i||this,t[n],n,t);return r}function B(t,e,i){const r={};for(const n in t)e.call(i||this,t[n],n,t)&&(r[n]=t[n]);return r}function F(t){return Array.isArray(t)?t.map(F):"object"==typeof t&&t?O(t,F):t}function N(t,e,i,r,n){return y((t-e)/(i-e)*(n-r)+r,r,n)}function U(t,e){for(let i=0;i=0)return!0;return!1}const j={};function V(t){j[t]||("undefined"!=typeof console&&console.warn(t),j[t]=!0)}function $(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function G(t){let e=0;for(let i,r,n=0,o=t.length,a=o-1;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,i={};if(t.replace(e,((t,e,r,n)=>{const o=r||n;return i[e]=!o||o.toLowerCase(),""})),i["max-age"]){const t=parseInt(i["max-age"],10);isNaN(t)?delete i["max-age"]:i["max-age"]=t}return i}let H=null;function W(t){if(null==H){const e=t.navigator?t.navigator.userAgent:null;H=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return H}function X(t){const e=t.navigator?t.navigator.userAgent:null;return!!W(t)&&e&&(e.match("Version/15.4")||e.match("Version/15.5")||e.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))}function Y(t){try{const i=e[t];return i.setItem("_mapbox_test_",1),i.removeItem("_mapbox_test_"),!0}catch(t){return!1}}function K(t){return e.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,((t,e)=>String.fromCharCode(Number("0x"+e)))))}function J(t){return decodeURIComponent(e.atob(t).split("").map((t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2))).join(""))}function Q(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function tt(t,e,i){t[4*e+0]=i[0],t[4*e+1]=i[1],t[4*e+2]=i[2],t[4*e+3]=i[3]}const et=e.performance;function it(t){const e=t?t.url.toString():void 0;return et.getEntriesByName(e)}var rt="2.9.1";let nt,ot,at,st;const lt={now:()=>void 0!==at?at:e.performance.now(),setNow(t){at=t},restoreNow(){at=void 0},frame(t){const i=e.requestAnimationFrame(t);return{cancel:()=>e.cancelAnimationFrame(i)}},getImageData(t,i=0){const{width:r,height:n}=t;st||(st=e.document.createElement("canvas"));const o=st.getContext("2d");if(!o)throw new Error("failed to create canvas 2d context");return(r>st.width||n>st.height)&&(st.width=r,st.height=n),o.clearRect(-i,-i,r+2*i,n+2*i),o.drawImage(t,0,0,r,n),o.getImageData(-i,-i,r+2*i,n+2*i)},resolveURL:t=>(nt||(nt=e.document.createElement("a")),nt.href=t,nt.href),get devicePixelRatio(){return e.devicePixelRatio},get prefersReducedMotion(){return!!e.matchMedia&&(null==ot&&(ot=e.matchMedia("(prefers-reduced-motion: reduce)")),ot.matches)}};let ht;const ct={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==ht){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{ht=null!=process.env.API_URL_REGEX?new RegExp(process.env.API_URL_REGEX):t}catch(e){ht=t}}return ht},get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ut={supported:!1,testSupport:vt};let dt,pt,ft=!1,mt=!1;function vt(t){!ft&&pt&&(mt?_t(t):dt=t)}function _t(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,pt),t.isContextLost())return;ut.supported=!0}catch(t){}t.deleteTexture(e),ft=!0}e.document&&(pt=e.document.createElement("img"),pt.onload=function(){dt&&_t(dt),dt=null,mt=!0},pt.onerror=function(){ft=!0,dt=null},pt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const gt="01";function yt(){const t="1",e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let i="";for(let t=0;t<10;t++)i+=e[Math.floor(62*Math.random())];const r=432e5;return{token:[t,gt,i].join(""),tokenExpiresAt:Date.now()+r}}const xt="NO_ACCESS_TOKEN";class bt{constructor(t,e,i){this._transformRequestFn=t,this._customAccessToken=e,this._silenceAuthErrors=!!i,this._createSkuToken()}_createSkuToken(){const t=yt();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}}normalizeStyleURL(t,e){if(!wt(t))return t;const i=At(t);return i.path=`/styles/v1${i.path}`,this._makeAPIURL(i,this._customAccessToken||e)}normalizeGlyphsURL(t,e){if(!wt(t))return t;const i=At(t);return i.path=`/fonts/v1${i.path}`,this._makeAPIURL(i,this._customAccessToken||e)}normalizeSourceURL(t,e,i,r){if(!wt(t))return t;const n=At(t);return n.path=`/v4/${n.authority}.json`,n.params.push("secure"),i&&n.params.push(`language=${i}`),r&&n.params.push(`worldview=${r}`),this._makeAPIURL(n,this._customAccessToken||e)}normalizeSpriteURL(t,e,i,r){const n=At(t);return wt(t)?(n.path=`/styles/v1${n.path}/sprite${e}${i}`,this._makeAPIURL(n,this._customAccessToken||r)):(n.path+=`${e}${i}`,Ct(n))}normalizeTileURL(t,e,i){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!wt(t))return t;const r=At(t),n=/(\.(png|jpg)\d*)(?=$)/,o=ut.supported?".webp":"$1",a=i&&"raster"!==r.authority&&512===i,s=e||a?"@2x":"";if(r.path=r.path.replace(n,`${s}${o}`),"raster"===r.authority)r.path=`/${ct.RASTER_URL_PREFIX}${r.path}`;else{const t=/^.+\/v4\//;r.path=r.path.replace(t,"/"),r.path=`/${ct.TILE_URL_VERSION}${r.path}`}const l=this._customAccessToken||Tt(r.params)||ct.ACCESS_TOKEN;return ct.REQUIRE_ACCESS_TOKEN&&l&&this._skuToken&&r.params.push(`sku=${this._skuToken}`),this._makeAPIURL(r,l)}canonicalizeTileURL(t,e){const i=/\.[\w]+$/,r=At(t);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(i))return t;let n="mapbox://";if(r.path.match(/^\/raster\/v1\//)){const t=`/${ct.RASTER_URL_PREFIX}/`;n+=`raster/${r.path.replace(t,"")}`}else{const t=`/${ct.TILE_URL_VERSION}/`;n+=`tiles/${r.path.replace(t,"")}`}let o=r.params;return e&&(o=o.filter((t=>!t.match(/^access_token=/)))),o.length&&(n+=`?${o.join("&")}`),n}canonicalizeTileset(t,e){const i=!!e&&wt(e),r=[];for(const e of t.tiles||[])zt(e)?r.push(this.canonicalizeTileURL(e,i)):r.push(e);return r}_makeAPIURL(t,e){const i="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",r=At(ct.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"http"===t.protocol){const e=t.params.indexOf("secure");e>=0&&t.params.splice(e,1)}if("/"!==r.path&&(t.path=`${r.path}${t.path}`),!ct.REQUIRE_ACCESS_TOKEN)return Ct(t);if(e=e||ct.ACCESS_TOKEN,!this._silenceAuthErrors){if(!e)throw new Error(`An API access token is required to use Mapbox GL. ${i}`);if("s"===e[0])throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${i}`)}return t.params=t.params.filter((t=>-1===t.indexOf("access_token"))),t.params.push(`access_token=${e||""}`),Ct(t)}}function wt(t){return 0===t.indexOf("mapbox:")}function zt(t){return ct.API_URL_REGEX.test(t)}function Mt(t){return t.indexOf("sku=")>0&&zt(t)}function Tt(t){for(const e of t){const t=e.match(/^access_token=(.*)$/);if(t)return t[1]}return null}const Et=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function At(t){const e=t.match(Et);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Ct(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}const St="mapbox.eventData";function It(t){if(!t)return null;const e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(J(e[1]))}catch(t){return null}}class Pt{constructor(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(t){const e=It(ct.ACCESS_TOKEN);let i="";return i=e&&e.u?K(e.u):ct.ACCESS_TOKEN||"",t?`${St}.${t}:${i}`:`${St}:${i}`}fetchEventData(){const t=Y("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{const t=e.localStorage.getItem(i);t&&(this.eventData=JSON.parse(t));const n=e.localStorage.getItem(r);n&&(this.anonId=n)}catch(t){V("Unable to read from LocalStorage")}}saveEventData(){const t=Y("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{e.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&e.localStorage.setItem(i,JSON.stringify(this.eventData))}catch(t){V("Unable to write to LocalStorage")}}processRequests(t){}postEvent(t,e,i,r){if(!ct.EVENTS_URL)return;const n=At(ct.EVENTS_URL);n.params.push(`access_token=${r||ct.ACCESS_TOKEN||""}`);const o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:rt,skuId:gt,userId:this.anonId},a=e?E(o,e):o,s={url:Ct(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=ye(s,(t=>{this.pendingRequest=null,i(t),this.saveEventData(),this.processRequests(r)}))}queueRequest(t,e){this.queue.push(t),this.processRequests(e)}}class kt extends Pt{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,r){this.skuToken=e,this.errorCb=r,ct.EVENTS_URL&&(i||ct.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(xt)))}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),L(this.anonId)||(this.anonId=I()),this.postEvent(i,{skuToken:this.skuToken},(t=>{t?this.errorCb(t):e&&(this.success[e]=!0)}),t))}}class Lt extends Pt{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,r){if(!ct.API_URL||!ct.SESSION_PATH)return;const n=At(ct.API_URL+ct.SESSION_PATH);n.params.push(`sku=${e||""}`),n.params.push(`access_token=${r||ct.ACCESS_TOKEN||""}`);const o={url:Ct(n),headers:{"Content-Type":"text/plain"}};this.pendingRequest=xe(o,(t=>{this.pendingRequest=null,i(t),this.saveEventData(),this.processRequests(r)}))}getSessionAPI(t,e,i,r){this.skuToken=e,this.errorCb=r,ct.SESSION_PATH&&ct.API_URL&&(i||ct.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(xt)))}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,(t=>{t?this.errorCb(t):e&&(this.success[e]=!0)}),t)}}class Dt extends Pt{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){ct.EVENTS_URL&&ct.ACCESS_TOKEN&&Array.isArray(t)&&t.some((t=>wt(t)||zt(t)))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||0===this.queue.length)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=It(ct.ACCESS_TOKEN),i=e?e.u:ct.ACCESS_TOKEN;let r=i!==this.eventData.tokenU;L(this.anonId)||(this.anonId=I(),r=!0);const n=this.queue.shift();if(this.eventData.lastSuccess){const t=new Date(this.eventData.lastSuccess),e=new Date(n),i=(n-this.eventData.lastSuccess)/864e5;r=r||i>=1||i<-1||t.getDate()!==e.getDate()}else r=!0;r?this.postEvent(n,{"enabled.telemetry":!1},(t=>{t||(this.eventData.lastSuccess=n,this.eventData.tokenU=i)}),t):this.processRequests()}}const Rt=new Dt,Ot=Rt.postTurnstileEvent.bind(Rt),Bt=new kt,Ft=Bt.postMapLoadEvent.bind(Bt),Nt=new Lt,Ut=Nt.getSessionAPI.bind(Nt),jt=new Set;function Vt(t,e){e?jt.add(t):jt.delete(t)}function $t(t){return jt.has(t)}function Gt(t){jt.delete(t)}const qt="mapbox-tiles";let Zt=500,Ht=50;const Wt=42e4;let Xt,Yt={};function Kt(t){const e=ee(t);let i,r;e&&e.forEach((t=>{const e=t.split("=");"language"===e[0]?i=e[1]:"worldview"===e[0]&&(r=e[1])}));let n=qt;return i&&(n+=`-${i}`),r&&(n+=`-${r}`),n}function Jt(t){e.caches&&!Yt[t]&&(Yt[t]=e.caches.open(t))}function Qt(t,e){if(void 0===Xt)try{new Response(new ReadableStream),Xt=!0}catch(t){Xt=!1}Xt?e(t.body):t.blob().then(e)}function te(t,i,r){const n=Kt(t.url);if(Jt(n),!Yt[n])return;const o={status:i.status,statusText:i.statusText,headers:new e.Headers};i.headers.forEach(((t,e)=>o.headers.set(e,t)));const a=Z(i.headers.get("Cache-Control")||"");if(a["no-store"])return;a["max-age"]&&o.headers.set("Expires",new Date(r+1e3*a["max-age"]).toUTCString());const s=o.headers.get("Expires");s&&(new Date(s).getTime()-r{const r=new e.Response(i,o);Jt(n),Yt[n]&&Yt[n].then((e=>e.put(ie(t.url),r))).catch((t=>V(t.message)))})))}function ee(t){const e=t.indexOf("?");return e>0?t.slice(e+1).split("&"):[]}function ie(t){const e=t.indexOf("?");if(e<0)return t;const i=ee(t).filter((t=>{const e=t.split("=");return"language"===e[0]||"worldview"===e[0]}));return i.length?`${t.slice(0,e)}?${i.join("&")}`:t.slice(0,e)}function re(t,e){const i=Kt(t.url);if(Jt(i),!Yt[i])return e(null);const r=ie(t.url);Yt[i].then((t=>{t.match(r).then((i=>{const n=ne(i);t.delete(r),n&&t.put(r,i.clone()),e(null,i,n)})).catch(e)})).catch(e)}function ne(t){if(!t)return!1;const e=new Date(t.headers.get("Expires")||0),i=Z(t.headers.get("Cache-Control")||"");return e>Date.now()&&!i["no-cache"]}let oe=1/0;function ae(t){oe++,oe>Ht&&(t.getActor().send("enforceCacheSizeLimit",Zt),oe=0)}function se(t){for(const e in Yt)Jt(e),Yt[e].then((e=>{e.keys().then((i=>{for(let r=0;rt()))}function he(t,e){Zt=t,Ht=e}const ce={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ce);class ue extends Error{constructor(t,e,i){401===e&&zt(i)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),super(t),this.status=e,this.url=i}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const de=q()?()=>self.worker&&self.worker.referrer:()=>("blob:"===e.location.protocol?e.parent:e).location.href,pe=t=>/^file:/.test(t)||/^file:/.test(de())&&!/^\w+:/.test(t);function fe(t,i){const r=new e.AbortController,n=new e.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:de(),signal:r.signal});let o=!1,a=!1;const s=Mt(n.url);"json"===t.type&&n.headers.set("Accept","application/json");const l=(r,o,l)=>{if(a)return;if(r&&"SecurityError"!==r.message&&V(r),o&&l)return h(o);const c=Date.now();e.fetch(n).then((e=>{if(e.ok){const t=s?e.clone():null;return h(e,t,c)}return i(new ue(e.statusText,e.status,t.url))})).catch((t=>{20!==t.code&&i(new Error(t.message))}))},h=(e,r,s)=>{("arrayBuffer"===t.type?e.arrayBuffer():"json"===t.type?e.json():e.text()).then((t=>{a||(r&&s&&te(n,r,s),o=!0,i(null,t,e.headers.get("Cache-Control"),e.headers.get("Expires")))})).catch((t=>{a||i(new Error(t.message))}))};return s?re(n,l):l(null,null),{cancel:()=>{a=!0,o||r.abort()}}}function me(t,i){const r=new e.XMLHttpRequest;r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer");for(const e in t.headers)r.setRequestHeader(e,t.headers[e]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=()=>{i(new Error(r.statusText))},r.onload=()=>{if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){let e=r.response;if("json"===t.type)try{e=JSON.parse(r.response)}catch(t){return i(t)}i(null,e,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else i(new ue(r.statusText,r.status,t.url))},r.send(t.body),{cancel:()=>r.abort()}}const ve=function(t,i){if(!pe(t.url)){if(e.fetch&&e.Request&&e.AbortController&&e.Request.prototype.hasOwnProperty("signal"))return fe(t,i);if(q()&&self.worker&&self.worker.actor){const e=!0;return self.worker.actor.send("getResource",t,i,void 0,e)}}return me(t,i)},_e=function(t,e){return ve(E(t,{type:"json"}),e)},ge=function(t,e){return ve(E(t,{type:"arrayBuffer"}),e)},ye=function(t,e){return ve(E(t,{method:"POST"}),e)},xe=function(t,e){return ve(E(t,{method:"GET"}),e)};function be(t){const i=e.document.createElement("a");return i.href=t,i.protocol===e.document.location.protocol&&i.host===e.document.location.host}const we="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ze(t,i){const r=new e.Image,n=e.URL;r.onload=()=>{i(null,r),n.revokeObjectURL(r.src),r.onload=null,e.requestAnimationFrame((()=>{r.src=we}))},r.onerror=()=>i(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const o=new e.Blob([new Uint8Array(t)],{type:"image/png"});r.src=t.byteLength?n.createObjectURL(o):we}function Me(t,i){const r=new e.Blob([new Uint8Array(t)],{type:"image/png"});e.createImageBitmap(r).then((t=>{i(null,t)})).catch((t=>{i(new Error(`Could not load image because of ${t.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))}))}let Te,Ee;Te=[],Ee=0;const Ae=function(t,i){if(ut.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ee>=ct.MAX_PARALLEL_IMAGE_REQUESTS){const e={requestParameters:t,callback:i,cancelled:!1,cancel(){this.cancelled=!0}};return Te.push(e),e}Ee++;let r=!1;const n=()=>{if(!r)for(r=!0,Ee--;Te.length&&Ee{n(),t?i(t):r&&(e.createImageBitmap?Me(r,((t,e)=>i(t,e,o,a))):ze(r,((t,e)=>i(t,e,o,a))))}));return{cancel:()=>{o.cancel(),n()}}},Ce=function(t,i){const r=e.document.createElement("video");r.muted=!0,r.onloadstart=function(){i(null,r)};for(let i=0;i{}}};function Se(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function Ie(t,e,i){if(i&&i[t]){const r=i[t].indexOf(e);-1!==r&&i[t].splice(r,1)}}class Pe{constructor(t,e={}){E(this,e),this.type=t}}class ke extends Pe{constructor(t,e={}){super("error",E({error:t},e))}}class Le{on(t,e){return this._listeners=this._listeners||{},Se(t,e,this._listeners),this}off(t,e){return Ie(t,e,this._listeners),Ie(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},Se(t,e,this._oneTimeListeners),this):new Promise((e=>this.once(t,e)))}fire(t,e){"string"==typeof t&&(t=new Pe(t,e||{}));const i=t.type;if(this.listens(i)){t.target=this;const e=this._listeners&&this._listeners[i]?this._listeners[i].slice():[];for(const i of e)i.call(this,t);const r=this._oneTimeListeners&&this._oneTimeListeners[i]?this._oneTimeListeners[i].slice():[];for(const e of r)Ie(i,e,this._oneTimeListeners),e.call(this,t);const n=this._eventedParent;n&&(E(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),n.fire(t))}else t instanceof ke&&console.error(t.error);return this}listens(t){return!!(this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var De=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":true,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"cross-faded"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"cross-faded":{"type":"property-type"},"cross-faded-data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function Re(t,...e){for(const i of e)for(const e in i)t[e]=i[e];return t}function Oe(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Be(t){if(Array.isArray(t))return t.map(Be);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=Be(t[i]);return e}return Oe(t)}class Fe extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}var Ne=Fe;class Ue{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,i]of e)this.bindings[t]=i}concat(t){return new Ue(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}var je=Ue;const Ve={kind:"null"},$e={kind:"number"},Ge={kind:"string"},qe={kind:"boolean"},Ze={kind:"color"},He={kind:"object"},We={kind:"value"},Xe={kind:"error"},Ye={kind:"collator"},Ke={kind:"formatted"},Je={kind:"resolvedImage"};function Qe(t,e){return{kind:"array",itemType:t,N:e}}function ti(t){if("array"===t.kind){const e=ti(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const ei=[Ve,$e,Ge,qe,Ze,Ke,He,Qe(We),Je];function ii(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ii(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of ei)if(!ii(t,e))return null}return`Expected ${ti(t)} but found ${ti(e)} instead.`}function ri(t,e){return e.some((e=>e.kind===t.kind))}function ni(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}function oi(t){var e={exports:{}};return t(e,e.exports),e.exports}var ai=oi((function(t,e){var i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,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],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,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],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,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],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,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],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,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],silver:[192,192,192,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],teal:[0,128,128,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],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100):n(parseFloat(t))}function s(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function l(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in i)return i[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=n.indexOf("("),h=n.indexOf(")");if(-1!==l&&h+1===n.length){var c=n.substr(0,l),u=n.substr(l+1,h-(l+1)).split(","),d=1;switch(c){case"rgba":if(4!==u.length)return null;d=a(u.pop());case"rgb":return 3!==u.length?null:[o(u[0]),o(u[1]),o(u[2]),d];case"hsla":if(4!==u.length)return null;d=a(u.pop());case"hsl":if(3!==u.length)return null;var p=(parseFloat(u[0])%360+360)%360/360,f=a(u[1]),m=a(u[2]),v=m<=.5?m*(f+1):m+f-m*f,_=2*m-v;return[r(255*s(_,v,p+1/3)),r(255*s(_,v,p)),r(255*s(_,v,p-1/3)),d];default:return null}}return null}try{e.parseCSSColor=l}catch(t){}}));class si{constructor(t,e,i,r=1){this.r=t,this.g=e,this.b=i,this.a=r}static parse(t){if(!t)return;if(t instanceof si)return t;if("string"!=typeof t)return;const e=ai.parseCSSColor(t);return e?new si(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,i,r]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(i)},${r})`}toArray(){const{r:t,g:e,b:i,a:r}=this;return 0===r?[0,0,0,0]:[255*t/r,255*e/r,255*i/r,r]}toArray01(){const{r:t,g:e,b:i,a:r}=this;return 0===r?[0,0,0,0]:[t/r,e/r,i/r,r]}toArray01PremultipliedAlpha(){const{r:t,g:e,b:i,a:r}=this;return[t,e,i,r]}}si.black=new si(0,0,0,1),si.white=new si(1,1,1,1),si.transparent=new si(0,0,0,0),si.red=new si(1,0,0,1),si.blue=new si(0,0,1,1);var li=si;class hi{constructor(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ci{constructor(t,e,i,r,n){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=i,this.fontStack=r,this.textColor=n}}class ui{constructor(t){this.sections=t}static fromString(t){return new ui([new ci(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof ui?t:ui.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const i={};e.fontStack&&(i["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(i["font-scale"]=e.scale),e.textColor&&(i["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(i)}return t}}class di{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new di({name:t,available:!1}):null}serialize(){return["image",this.name]}}function pi(t,e,i,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[t,e,i,r]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function fi(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof li)return!0;if(t instanceof hi)return!0;if(t instanceof ui)return!0;if(t instanceof di)return!0;if(Array.isArray(t)){for(const e of t)if(!fi(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!fi(t[e]))return!1;return!0}return!1}function mi(t){if(null===t)return Ve;if("string"==typeof t)return Ge;if("boolean"==typeof t)return qe;if("number"==typeof t)return $e;if(t instanceof li)return Ze;if(t instanceof hi)return Ye;if(t instanceof ui)return Ke;if(t instanceof di)return Je;if(Array.isArray(t)){const e=t.length;let i;for(const e of t){const t=mi(e);if(i){if(i===t)continue;i=We;break}i=t}return Qe(i||We,e)}return He}function vi(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof li||t instanceof ui||t instanceof di?t.toString():JSON.stringify(t)}class _i{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!fi(t[1]))return e.error("invalid value");const i=t[1];let r=mi(i);const n=e.expectedType;return"array"!==r.kind||0!==r.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(r=n),new _i(r,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof li?["rgba"].concat(this.value.toArray()):this.value instanceof ui?this.value.serialize():this.value}}var gi=_i;class yi{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}var xi=yi;const bi={string:Ge,number:$e,boolean:qe,object:He};class wi{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i,r=1;const n=t[0];if("array"===n){let n,o;if(t.length>2){const i=t[1];if("string"!=typeof i||!(i in bi)||"object"===i)return e.error('The item type argument of "array" must be one of string, number, boolean',1);n=bi[i],r++}else n=We;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],r++}i=Qe(n,o)}else i=bi[n];const o=[];for(;rt.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);const r=t.N;("number"==typeof r||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map((t=>t.serialize())))}}var zi=wi;class Mi{constructor(t){this.type=Ke,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");const r=[];let n=!1;for(let i=1;i<=t.length-1;++i){const o=t[i];if(n&&"object"==typeof o&&!Array.isArray(o)){n=!1;let t=null;if(o["font-scale"]&&(t=e.parse(o["font-scale"],1,$e),!t))return null;let i=null;if(o["text-font"]&&(i=e.parse(o["text-font"],1,Qe(Ge)),!i))return null;let a=null;if(o["text-color"]&&(a=e.parse(o["text-color"],1,Ze),!a))return null;const s=r[r.length-1];s.scale=t,s.font=i,s.textColor=a}else{const o=e.parse(t[i],1,We);if(!o)return null;const a=o.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,r.push({content:o,scale:null,font:null,textColor:null})}}return new Mi(r)}evaluate(t){const e=e=>{const i=e.content.evaluate(t);return mi(i)===Je?new ci("",i,null,null,null):new ci(vi(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)};return new ui(this.sections.map(e))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const i={};e.scale&&(i["font-scale"]=e.scale.serialize()),e.font&&(i["text-font"]=e.font.serialize()),e.textColor&&(i["text-color"]=e.textColor.serialize()),t.push(i)}return t}}class Ti{constructor(t){this.type=Je,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,Ge);return i?new Ti(i):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),i=di.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Ei={"to-boolean":qe,"to-color":Ze,"to-number":$e,"to-string":Ge};class Ai{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");const r=Ei[i],n=[];for(let i=1;i4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:pi(e[0],e[1],e[2],e[3]),!i))return new li(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new xi(i||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const i of this.args){if(e=i.evaluate(t),null===e)return 0;const r=Number(e);if(!isNaN(r))return r}throw new xi(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?ui.fromString(vi(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?di.fromString(vi(this.args[0].evaluate(t))):vi(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new Mi([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Ti(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Ci=Ai;const Si=["Unknown","Point","LineString","Polygon"];class Ii{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Si[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord,n=i*e-t[0],o=r*e-t[1];return this.featureDistanceData.bearing[0]*n+this.featureDistanceData.bearing[1]*o}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=li.parse(t)),e}}var Pi=Ii;class ki{constructor(t,e,i,r){this.name=t,this.type=e,this._evaluate=i,this.args=r}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const i=t[0],r=ki.definitions[i];if(!r)return e.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let s=null;for(const[r,o]of a){s=new fr(e.registry,e.path,null,e.scope);const a=[];let l=!1;for(let e=1;eLi(t))).join(" | "),r=[];for(let i=1;i=e[2]||t[1]<=e[1]||t[3]>=e[3])}function ji(t,e){const i=Fi(t[0]),r=Ni(t[1]),n=Math.pow(2,e.z);return[Math.round(i*n*Oi),Math.round(r*n*Oi)]}function Vi(t,e,i){const r=t[0]-e[0],n=t[1]-e[1],o=t[0]-i[0],a=t[1]-i[1];return r*a-o*n==0&&r*o<=0&&n*a<=0}function $i(t,e,i){return e[1]>t[1]!=i[1]>t[1]&&t[0]<(i[0]-e[0])*(t[1]-e[1])/(i[1]-e[1])+e[0]}function Gi(t,e){let i=!1;for(let r=0,n=e.length;r0&&u<0||c<0&&u>0}function Wi(t,e,i,r){const n=[e[0]-t[0],e[1]-t[1]];return 0!==Zi([r[0]-i[0],r[1]-i[1]],n)&&!(!Hi(t,e,i,r)||!Hi(i,r,t,e))}function Xi(t,e,i){for(const r of i)for(let i=0;ii[2]){const e=.5*r;let n=t[0]-i[0]>e?-r:i[0]-t[0]>e?r:0;0===n&&(n=t[0]-i[2]>e?-r:i[2]-t[0]>e?r:0),t[0]+=n}Bi(e,t)}function er(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function ir(t,e,i,r){const n=Math.pow(2,r.z)*Oi,o=[r.x*Oi,r.y*Oi],a=[];if(!t)return a;for(const r of t)for(const t of r){const r=[t.x+o[0],t.y+o[1]];tr(r,e,i,n),a.push(r)}return a}function rr(t,e,i,r){const n=Math.pow(2,r.z)*Oi,o=[r.x*Oi,r.y*Oi],a=[];if(!t)return a;for(const i of t){const t=[];for(const r of i){const i=[r.x+o[0],r.y+o[1]];Bi(e,i),t.push(i)}a.push(t)}if(e[2]-e[0]<=n/2){er(e);for(const t of a)for(const r of t)tr(r,e,i,n)}return a}function nr(t,e){const i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(!n)return!1;if("Polygon"===e.type){const o=Ji(e.coordinates,r,n),a=ir(t.geometry(),i,r,n);if(!Ui(i,r))return!1;for(const t of a)if(!Gi(t,o))return!1}if("MultiPolygon"===e.type){const o=Qi(e.coordinates,r,n),a=ir(t.geometry(),i,r,n);if(!Ui(i,r))return!1;for(const t of a)if(!qi(t,o))return!1}return!0}function or(t,e){const i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(!n)return!1;if("Polygon"===e.type){const o=Ji(e.coordinates,r,n),a=rr(t.geometry(),i,r,n);if(!Ui(i,r))return!1;for(const t of a)if(!Yi(t,o))return!1}if("MultiPolygon"===e.type){const o=Qi(e.coordinates,r,n),a=rr(t.geometry(),i,r,n);if(!Ui(i,r))return!1;for(const t of a)if(!Ki(t,o))return!1}return!0}class ar{constructor(t,e){this.type=qe,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(fi(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t{e&&!lr(t)&&(e=!1)})),e}function hr(t){if(t instanceof Di&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!hr(t)&&(e=!1)})),e}function cr(t,e){if(t instanceof Di&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild((t=>{i&&!cr(t,e)&&(i=!1)})),i}class ur{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const i=t[1];return e.scope.has(i)?new ur(i,e.scope.get(i)):e.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var dr=ur;class pr{constructor(t,e=[],i,r=new je,n=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=r,this.errors=n,this.expectedType=i}parse(t,e,i,r,n={}){return e?this.concat(e,i,r)._parse(t,n):this._parse(t,n)}_parse(t,e){function i(t,e,i){return"assert"===i?new zi(e,[t]):"coerce"===i?new Ci(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=t[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const n=this.registry[r];if(n){let r=n.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,n=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==n.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(t,n))return null}else r=i(r,t,e.typeAnnotation||"coerce");else r=i(r,t,e.typeAnnotation||"assert")}if(!(r instanceof gi)&&"resolvedImage"!==r.type.kind&&mr(r)){const t=new Pi;try{r=new gi(r.type,r.evaluate(t))}catch(t){return this.error(t.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,i){const r="number"==typeof t?this.path.concat(t):this.path,n=i?this.scope.concat(i):this.scope;return new pr(this.registry,r,e||null,n,this.errors)}error(t,...e){const i=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new Ne(i,t))}checkSubtype(t,e){const i=ii(t,e);return i&&this.error(i),i}}var fr=pr;function mr(t){if(t instanceof dr)return mr(t.boundExpression);if(t instanceof Di&&"error"===t.name)return!1;if(t instanceof Ri)return!1;if(t instanceof sr)return!1;const e=t instanceof Ci||t instanceof zi;let i=!0;return t.eachChild((t=>{i=e?i&&mr(t):i&&t instanceof gi})),!!i&&lr(t)&&cr(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function vr(t,e){const i=t.length-1;let r,n,o=0,a=i,s=0;for(;o<=a;)if(s=Math.floor((o+a)/2),r=t[s],n=t[s+1],r<=e){if(s===i||ee))throw new xi("Input is not a number.");a=s-1}return 0}class _r{constructor(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of i)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const i=e.parse(t[1],1,$e);if(!i)return null;const r=[];let n=null;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(let i=1;i=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const h=e.parse(a,l,n);if(!h)return null;n=n||h.type,r.push([o,h])}return new _r(n,i,r)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const n=e.length;return r>=e[n-1]?i[n-1].evaluate(t):i[vr(e,r)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var gr=_r;function yr(t,e,i){return t*(1-i)+e*i}function xr(t,e,i){return new li(yr(t.r,e.r,i),yr(t.g,e.g,i),yr(t.b,e.b,i),yr(t.a,e.a,i))}function br(t,e,i){return t.map(((t,r)=>yr(t,e[r],i)))}var wr=Object.freeze({__proto__:null,number:yr,color:xr,array:br});const zr=.95047,Mr=1,Tr=1.08883,Er=4/29,Ar=6/29,Cr=3*Ar*Ar,Sr=Ar*Ar*Ar,Ir=Math.PI/180,Pr=180/Math.PI;function kr(t){return t>Sr?Math.pow(t,1/3):t/Cr+Er}function Lr(t){return t>Ar?t*t*t:Cr*(t-Er)}function Dr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Rr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Or(t){const e=Rr(t.r),i=Rr(t.g),r=Rr(t.b),n=kr((.4124564*e+.3575761*i+.1804375*r)/zr),o=kr((.2126729*e+.7151522*i+.072175*r)/Mr);return{l:116*o-16,a:500*(n-o),b:200*(o-kr((.0193339*e+.119192*i+.9503041*r)/Tr)),alpha:t.a}}function Br(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=Mr*Lr(e),i=zr*Lr(i),r=Tr*Lr(r),new li(Dr(3.2404542*i-1.5371385*e-.4985314*r),Dr(-.969266*i+1.8760108*e+.041556*r),Dr(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}function Fr(t,e,i){return{l:yr(t.l,e.l,i),a:yr(t.a,e.a,i),b:yr(t.b,e.b,i),alpha:yr(t.alpha,e.alpha,i)}}function Nr(t){const{l:e,a:i,b:r}=Or(t),n=Math.atan2(r,i)*Pr;return{h:n<0?n+360:n,c:Math.sqrt(i*i+r*r),l:e,alpha:t.a}}function Ur(t){const e=t.h*Ir,i=t.c;return Br({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})}function jr(t,e,i){const r=e-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}function Vr(t,e,i){return{h:jr(t.h,e.h,i),c:yr(t.c,e.c,i),l:yr(t.l,e.l,i),alpha:yr(t.alpha,e.alpha,i)}}const $r={forward:Or,reverse:Br,interpolate:Fr},Gr={forward:Nr,reverse:Ur,interpolate:Vr};var qr=Object.freeze({__proto__:null,lab:$r,hcl:Gr});class Zr{constructor(t,e,i,r,n){this.type=t,this.operator=e,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[t,e]of n)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,r,n){let o=0;if("exponential"===t.name)o=Hr(e,t.base,r,n);else if("linear"===t.name)o=Hr(e,1,r,n);else if("cubic-bezier"===t.name){const a=t.controlPoints;o=new i(a[0],a[1],a[2],a[3]).solve(Hr(e,1,r,n))}return o}static parse(t,e){let[i,r,n,...o]=t;if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){const t=r[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:t}}else{if("cubic-bezier"!==r[0])return e.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const t=r.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(n=e.parse(n,2,$e),!n)return null;const a=[];let s=null;"interpolate-hcl"===i||"interpolate-lab"===i?s=Ze:e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType);for(let t=0;t=i)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);const h=e.parse(r,l,s);if(!h)return null;s=s||h.type,a.push([i,h])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Zr(s,i,r,n,a):e.error(`Type ${ti(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const r=this.input.evaluate(t);if(r<=e[0])return i[0].evaluate(t);const n=e.length;if(r>=e[n-1])return i[n-1].evaluate(t);const o=vr(e,r),a=e[o],s=e[o+1],l=Zr.interpolationFactor(this.interpolation,r,a,s),h=i[o].evaluate(t),c=i[o+1].evaluate(t);return"interpolate"===this.operator?wr[this.type.kind.toLowerCase()](h,c,l):"interpolate-hcl"===this.operator?Gr.reverse(Gr.interpolate(Gr.forward(h),Gr.forward(c),l)):$r.reverse($r.interpolate($r.forward(h),$r.forward(c),l))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let t=0;tii(r,t.type)));return new Xr(o?We:i,n)}evaluate(t){let e,i=null,r=0;for(const n of this.args){if(r++,i=n.evaluate(t),i&&i instanceof di&&!i.available&&(e||(e=i),i=null,r===this.args.length))return e;if(null!==i)break}return i}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var Yr=Xr;class Kr{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const i=[];for(let r=1;r=i.length)throw new xi(`Array index out of bounds: ${e} > ${i.length-1}.`);if(e!==Math.floor(e))throw new xi(`Array index must be an integer, but found ${e} instead.`);return i[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var tn=Qr;class en{constructor(t,e){this.type=qe,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,We),r=e.parse(t[2],2,We);return i&&r?ri(i.type,[qe,Ge,$e,Ve,We])?new en(i,r):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${ti(i.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(null==i)return!1;if(!ni(e,["boolean","string","number","null"]))throw new xi(`Expected first argument to be of type boolean, string, number or null, but found ${ti(mi(e))} instead.`);if(!ni(i,["string","array"]))throw new xi(`Expected second argument to be of type array or string, but found ${ti(mi(i))} instead.`);return i.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var rn=en;class nn{constructor(t,e,i){this.type=$e,this.needle=t,this.haystack=e,this.fromIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,We),r=e.parse(t[2],2,We);if(!i||!r)return null;if(!ri(i.type,[qe,Ge,$e,Ve,We]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${ti(i.type)} instead`);if(4===t.length){const n=e.parse(t[3],3,$e);return n?new nn(i,r,n):null}return new nn(i,r)}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!ni(e,["boolean","string","number","null"]))throw new xi(`Expected first argument to be of type boolean, string, number or null, but found ${ti(mi(e))} instead.`);if(!ni(i,["string","array"]))throw new xi(`Expected second argument to be of type array or string, but found ${ti(mi(i))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(t);return i.indexOf(e,r)}return i.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var on=nn;class an{constructor(t,e,i,r,n,o){this.inputType=t,this.type=e,this.input=i,this.cases=r,this.outputs=n,this.otherwise=o}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let i,r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const n={},o=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return h.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return h.error("Numeric branch labels must be integer values.");if(i){if(h.checkSubtype(i,mi(t)))return null}else i=mi(t);if(void 0!==n[String(t)])return h.error("Branch labels must be unique.");n[String(t)]=o.length}const c=e.parse(l,a,r);if(!c)return null;r=r||c.type,o.push(c)}const a=e.parse(t[1],1,We);if(!a)return null;const s=e.parse(t[t.length-1],t.length-1,r);return s?"value"!==a.type.kind&&e.concat(1).checkSubtype(i,a.type)?null:new an(i,r,a,n,o,s):null}evaluate(t){const e=this.input.evaluate(t);return(mi(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),i=[],r={};for(const t of e){const e=r[this.cases[t]];void 0===e?(r[this.cases[t]]=i.length,i.push([this.cases[t],[t]])):i[e][1].push(t)}const n=t=>"number"===this.inputType.kind?Number(t):t;for(const[e,r]of i)1===r.length?t.push(n(r[0])):t.push(r.map(n)),t.push(this.outputs[e].serialize());return t.push(this.otherwise.serialize()),t}}var sn=an;class ln{constructor(t,e,i){this.type=t,this.branches=e,this.otherwise=i}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const r=[];for(let n=1;ne.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}var hn=ln;class cn{constructor(t,e,i,r){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,We),r=e.parse(t[2],2,$e);if(!i||!r)return null;if(!ri(i.type,[Qe(We),Ge,We]))return e.error(`Expected first argument to be of type array or string, but found ${ti(i.type)} instead`);if(4===t.length){const n=e.parse(t[3],3,$e);return n?new cn(i.type,i,r,n):null}return new cn(i.type,i,r)}evaluate(t){const e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!ni(e,["string","array"]))throw new xi(`Expected first argument to be of type array or string, but found ${ti(mi(e))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(t);return e.slice(i,r)}return e.slice(i)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var un=cn;function dn(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function pn(t,e,i){return e===i}function fn(t,e,i){return e!==i}function mn(t,e,i){return ei}function _n(t,e,i){return e<=i}function gn(t,e,i){return e>=i}function yn(t,e,i,r){return 0===r.compare(e,i)}function xn(t,e,i,r){return!yn(t,e,i,r)}function bn(t,e,i,r){return r.compare(e,i)<0}function wn(t,e,i,r){return r.compare(e,i)>0}function zn(t,e,i,r){return r.compare(e,i)<=0}function Mn(t,e,i,r){return r.compare(e,i)>=0}function Tn(t,e,i){const r="=="!==t&&"!="!==t;return class n{constructor(t,e,i){this.type=qe,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const i=t[0];let o=e.parse(t[1],1,We);if(!o)return null;if(!dn(i,o.type))return e.concat(1).error(`"${i}" comparisons are not supported for type '${ti(o.type)}'.`);let a=e.parse(t[2],2,We);if(!a)return null;if(!dn(i,a.type))return e.concat(2).error(`"${i}" comparisons are not supported for type '${ti(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error(`Cannot compare types '${ti(o.type)}' and '${ti(a.type)}'.`);r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new zi(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new zi(o.type,[a])));let s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,Ye),!s)return null}return new n(o,a,s)}evaluate(n){const o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){const e=mi(o),i=mi(a);if(e.kind!==i.kind||"string"!==e.kind&&"number"!==e.kind)throw new xi(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${i.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const t=mi(o),i=mi(a);if("string"!==t.kind||"string"!==i.kind)return e(n,o,a)}return this.collator?i(n,o,a,this.collator.evaluate(n)):e(n,o,a)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const En=Tn("==",pn,yn),An=Tn("!=",fn,xn),Cn=Tn("<",mn,bn),Sn=Tn(">",vn,wn),In=Tn("<=",_n,zn),Pn=Tn(">=",gn,Mn);class kn{constructor(t,e,i,r,n){this.type=Ge,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=n}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,$e);if(!i)return null;const r=t[2];if("object"!=typeof r||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");let n=null;if(r.locale&&(n=e.parse(r.locale,1,Ge),!n))return null;let o=null;if(r.currency&&(o=e.parse(r.currency,1,Ge),!o))return null;let a=null;if(r["min-fraction-digits"]&&(a=e.parse(r["min-fraction-digits"],1,$e),!a))return null;let s=null;return r["max-fraction-digits"]&&(s=e.parse(r["max-fraction-digits"],1,$e),!s)?null:new kn(i,n,o,a,s)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class Ln{constructor(t){this.type=$e,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error(`Expected argument of type string or array, but found ${ti(i.type)} instead.`):new Ln(i):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new xi(`Expected value to be of type string or array, but found ${ti(mi(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const Dn={"==":En,"!=":An,">":Sn,"<":Cn,">=":Pn,"<=":In,array:zi,at:tn,boolean:zi,case:hn,coalesce:Yr,collator:Ri,format:Mi,image:Ti,in:rn,"index-of":on,interpolate:Wr,"interpolate-hcl":Wr,"interpolate-lab":Wr,length:Ln,let:Jr,literal:gi,match:sn,number:zi,"number-format":kn,object:zi,slice:un,step:gr,string:zi,"to-boolean":Ci,"to-color":Ci,"to-number":Ci,"to-string":Ci,var:dr,within:sr};function Rn(t,[e,i,r,n]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const o=n?n.evaluate(t):1,a=pi(e,i,r,o);if(a)throw new xi(a);return new li(e/255*o,i/255*o,r/255*o,o)}function On(t,e){return t in e}function Bn(t,e){const i=e[t];return void 0===i?null:i}function Fn(t,e,i,r){for(;i<=r;){const n=i+r>>1;if(e[n]===t)return!0;e[n]>t?r=n-1:i=n+1}return!1}function Nn(t){return{type:t}}Di.register(Dn,{error:[Xe,[Ge],(t,[e])=>{throw new xi(e.evaluate(t))}],typeof:[Ge,[We],(t,[e])=>ti(mi(e.evaluate(t)))],"to-rgba":[Qe($e,4),[Ze],(t,[e])=>e.evaluate(t).toArray()],rgb:[Ze,[$e,$e,$e],Rn],rgba:[Ze,[$e,$e,$e,$e],Rn],has:{type:qe,overloads:[[[Ge],(t,[e])=>On(e.evaluate(t),t.properties())],[[Ge,He],(t,[e,i])=>On(e.evaluate(t),i.evaluate(t))]]},get:{type:We,overloads:[[[Ge],(t,[e])=>Bn(e.evaluate(t),t.properties())],[[Ge,He],(t,[e,i])=>Bn(e.evaluate(t),i.evaluate(t))]]},"feature-state":[We,[Ge],(t,[e])=>Bn(e.evaluate(t),t.featureState||{})],properties:[He,[],t=>t.properties()],"geometry-type":[Ge,[],t=>t.geometryType()],id:[We,[],t=>t.id()],zoom:[$e,[],t=>t.globals.zoom],pitch:[$e,[],t=>t.globals.pitch||0],"distance-from-center":[$e,[],t=>t.distanceFromCenter()],"heatmap-density":[$e,[],t=>t.globals.heatmapDensity||0],"line-progress":[$e,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[$e,[],t=>t.globals.skyRadialProgress||0],accumulated:[We,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[$e,Nn($e),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[$e,Nn($e),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:$e,overloads:[[[$e,$e],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[$e],(t,[e])=>-e.evaluate(t)]]},"/":[$e,[$e,$e],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[$e,[$e,$e],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[$e,[],()=>Math.LN2],pi:[$e,[],()=>Math.PI],e:[$e,[],()=>Math.E],"^":[$e,[$e,$e],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[$e,[$e],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[$e,[$e],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[$e,[$e],(t,[e])=>Math.log(e.evaluate(t))],log2:[$e,[$e],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[$e,[$e],(t,[e])=>Math.sin(e.evaluate(t))],cos:[$e,[$e],(t,[e])=>Math.cos(e.evaluate(t))],tan:[$e,[$e],(t,[e])=>Math.tan(e.evaluate(t))],asin:[$e,[$e],(t,[e])=>Math.asin(e.evaluate(t))],acos:[$e,[$e],(t,[e])=>Math.acos(e.evaluate(t))],atan:[$e,[$e],(t,[e])=>Math.atan(e.evaluate(t))],min:[$e,Nn($e),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[$e,Nn($e),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[$e,[$e],(t,[e])=>Math.abs(e.evaluate(t))],round:[$e,[$e],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[$e,[$e],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[$e,[$e],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[qe,[Ge,We],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[qe,[We],(t,[e])=>t.id()===e.value],"filter-type-==":[qe,[Ge],(t,[e])=>t.geometryType()===e.value],"filter-<":[qe,[Ge,We],(t,[e,i])=>{const r=t.properties()[e.value],n=i.value;return typeof r==typeof n&&r{const i=t.id(),r=e.value;return typeof i==typeof r&&i":[qe,[Ge,We],(t,[e,i])=>{const r=t.properties()[e.value],n=i.value;return typeof r==typeof n&&r>n}],"filter-id->":[qe,[We],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[qe,[Ge,We],(t,[e,i])=>{const r=t.properties()[e.value],n=i.value;return typeof r==typeof n&&r<=n}],"filter-id-<=":[qe,[We],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[qe,[Ge,We],(t,[e,i])=>{const r=t.properties()[e.value],n=i.value;return typeof r==typeof n&&r>=n}],"filter-id->=":[qe,[We],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[qe,[We],(t,[e])=>e.value in t.properties()],"filter-has-id":[qe,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[qe,[Qe(Ge)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[qe,[Qe(We)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[qe,[Ge,Qe(We)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[qe,[Ge,Qe(We)],(t,[e,i])=>Fn(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:qe,overloads:[[[qe,qe],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Nn(qe),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:qe,overloads:[[[qe,qe],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Nn(qe),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[qe,[qe],(t,[e])=>!e.evaluate(t)],"is-supported-script":[qe,[Ge],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ge,[Ge],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ge,[Ge],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ge,Nn(We),(t,e)=>e.map((e=>vi(e.evaluate(t)))).join("")],"resolved-locale":[Ge,[Ye],(t,[e])=>e.evaluate(t).resolvedLocale()]});var Un=Dn;function jn(t){return{result:"success",value:t}}function Vn(t){return{result:"error",value:t}}function $n(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Gn(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function qn(t){return!!t.expression&&t.expression.interpolated}function Zn(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Hn(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Wn(t){return t}function Xn(t,e){const i="color"===e.type,r=t.stops&&"object"==typeof t.stops[0][0],n=r||void 0!==t.property,o=r||!n,a=t.type||(qn(e)?"exponential":"interval");if(i&&((t=Re({},t)).stops&&(t.stops=t.stops.map((t=>[t[0],li.parse(t[1])]))),t.default?t.default=li.parse(t.default):t.default=li.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!qr[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,l,h;if("exponential"===a)s=Qn;else if("interval"===a)s=Jn;else if("categorical"===a){s=Kn,l=Object.create(null);for(const e of t.stops)l[e[0]]=e[1];h=typeof t.stops[0][0]}else{if("identity"!==a)throw new Error(`Unknown function type "${a}"`);s=to}if(r){const i={},r=[];for(let e=0;et[0])),evaluate:({zoom:i},r)=>Qn({stops:n,base:t.base},e,i).evaluate(i,r)}}if(o){const i="exponential"===a?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:i,interpolationFactor:Wr.interpolationFactor.bind(void 0,i),zoomStops:t.stops.map((t=>t[0])),evaluate:({zoom:i})=>s(t,e,i,l,h)}}return{kind:"source",evaluate(i,r){const n=r&&r.properties?r.properties[t.property]:void 0;return void 0===n?Yn(t.default,e.default):s(t,e,n,l,h)}}}function Yn(t,e,i){return void 0!==t?t:void 0!==e?e:void 0!==i?i:void 0}function Kn(t,e,i,r,n){return Yn(typeof i===n?r[i]:void 0,t.default,e.default)}function Jn(t,e,i){if("number"!==Zn(i))return Yn(t.default,e.default);const r=t.stops.length;if(1===r)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const n=vr(t.stops.map((t=>t[0])),i);return t.stops[n][1]}function Qn(t,e,i){const r=void 0!==t.base?t.base:1;if("number"!==Zn(i))return Yn(t.default,e.default);const n=t.stops.length;if(1===n)return t.stops[0][1];if(i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[n-1][0])return t.stops[n-1][1];const o=vr(t.stops.map((t=>t[0])),i),a=eo(i,r,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1];let h=wr[e.type]||Wn;if(t.colorSpace&&"rgb"!==t.colorSpace){const e=qr[t.colorSpace];h=(t,i)=>e.reverse(e.interpolate(e.forward(t),e.forward(i),a))}return"function"==typeof s.evaluate?{evaluate(...t){const e=s.evaluate.apply(void 0,t),i=l.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==i)return h(e,i,a)}}:h(s,l,a)}function to(t,e,i){return"color"===e.type?i=li.parse(i):"formatted"===e.type?i=ui.fromString(i.toString()):"resolvedImage"===e.type?i=di.fromString(i.toString()):Zn(i)===e.type||"enum"===e.type&&e.values[i]||(i=void 0),Yn(i,t.default,e.default)}function eo(t,e,i,r){const n=r-i,o=t-i;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}class io{constructor(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Pi,this._defaultValue=e?po(e):null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,i,r,n,o,a,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=r||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,i,r,n,o,a,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new xi(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function ro(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Un}function no(t,e){const i=new fr(Un,[],e?uo(e):void 0),r=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return r?jn(new io(r,e)):Vn(i.errors)}class oo{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!hr(e.expression)}evaluateWithoutErrorHandling(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)}evaluate(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)}}class ao{constructor(t,e,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!hr(e.expression),this.interpolationType=r}evaluateWithoutErrorHandling(t,e,i,r,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,r,n,o)}evaluate(t,e,i,r,n,o){return this._styleExpression.evaluate(t,e,i,r,n,o)}interpolationFactor(t,e,i){return this.interpolationType?Wr.interpolationFactor(this.interpolationType,t,e,i):0}}function so(t,e){if("error"===(t=no(t,e)).result)return t;const i=t.value.expression,r=lr(i);if(!r&&!$n(e))return Vn([new Ne("","data expressions not supported")]);const n=cr(i,["zoom","pitch","distance-from-center"]);if(!n&&!Gn(e))return Vn([new Ne("","zoom expressions not supported")]);const o=co(i);if(!o&&!n)return Vn([new Ne("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof Ne)return Vn([o]);if(o instanceof Wr&&!qn(e))return Vn([new Ne("",'"interpolate" expressions cannot be used with this property')]);if(!o)return jn(new oo(r?"constant":"source",t.value));const a=o instanceof Wr?o.interpolation:void 0;return jn(new ao(r?"camera":"composite",t.value,o.labels,a))}class lo{constructor(t,e){this._parameters=t,this._specification=e,Re(this,Xn(this._parameters,this._specification))}static deserialize(t){return new lo(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function ho(t,e){if(Hn(t))return new lo(t,e);if(ro(t)){const i=so(t,e);if("error"===i.result)throw new Error(i.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return i.value}{let i=t;return"string"==typeof t&&"color"===e.type&&(i=li.parse(t)),{kind:"constant",evaluate:()=>i}}}function co(t){let e=null;if(t instanceof Jr)e=co(t.result);else if(t instanceof Yr){for(const i of t.args)if(e=co(i),e)break}else(t instanceof gr||t instanceof Wr)&&t.input instanceof Di&&"zoom"===t.input.name&&(e=t);return e instanceof Ne||t.eachChild((t=>{const i=co(t);i instanceof Ne?e=i:!e&&i?e=new Ne("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new Ne("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function uo(t){const e={color:Ze,string:Ge,number:$e,enum:Ge,boolean:qe,formatted:Ke,resolvedImage:Je};return"array"===t.type?Qe(e[t.value]||We,t.length):e[t.type]}function po(t){return"color"===t.type&&(Hn(t.default)||Array.isArray(t.default))?new li(0,0,0,0):"color"===t.type?li.parse(t.default)||null:void 0===t.default?null:t.default}class fo{constructor(t,e,i,r){this.message=(t?`${t}: `:"")+i,r&&(this.identifier=r),null!=e&&e.__line__&&(this.line=e.__line__)}}function mo(t){const e=t.key,i=t.value,r=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec;let s=[];const l=Zn(i);if("object"!==l)return[new fo(e,i,`object expected, ${l} found`)];for(const t in i){const l=t.split(".")[0],h=r[l]||r["*"];let c;n[l]?c=n[l]:r[l]?c=na:n["*"]?c=n["*"]:r["*"]&&(c=na),c?s=s.concat(c({key:(e?`${e}.`:e)+t,value:i[t],valueSpec:h,style:o,styleSpec:a,object:i,objectKey:t},i)):s.push(new fo(e,i[t],`unknown property "${t}"`))}for(const t in r)n[t]||r[t].required&&void 0===r[t].default&&void 0===i[t]&&s.push(new fo(e,i,`missing required property "${t}"`));return s}function vo(t){const e=t.value,i=t.valueSpec,r=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||na;if("array"!==Zn(e))return[new fo(o,e,`array expected, ${Zn(e)} found`)];if(i.length&&e.length!==i.length)return[new fo(o,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.lengthn)return[new fo(e,i,`${i} is greater than the maximum value ${n}`)]}return[]}function go(t){const e=t.valueSpec,i=Oe(t.value.type);let r,n,o,a={};const s="categorical"!==i&&void 0===t.value.property,l=!s,h="array"===Zn(t.value.stops)&&"array"===Zn(t.value.stops[0])&&"object"===Zn(t.value.stops[0][0]),c=mo({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:u,default:f}});return"identity"===i&&s&&c.push(new fo(t.key,t.value,'missing required property "property"')),"identity"===i||t.value.stops||c.push(new fo(t.key,t.value,'missing required property "stops"')),"exponential"===i&&t.valueSpec.expression&&!qn(t.valueSpec)&&c.push(new fo(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!$n(t.valueSpec)?c.push(new fo(t.key,t.value,"property functions not supported")):s&&!Gn(t.valueSpec)&&c.push(new fo(t.key,t.value,"zoom functions not supported"))),"categorical"!==i&&!h||void 0!==t.value.property||c.push(new fo(t.key,t.value,'"property" property is required')),c;function u(t){if("identity"===i)return[new fo(t.key,t.value,'identity function may not have a "stops" property')];let e=[];const r=t.value;return e=e.concat(vo({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:d})),"array"===Zn(r)&&0===r.length&&e.push(new fo(t.key,r,"array must have at least one stop")),e}function d(t){let i=[];const r=t.value,s=t.key;if("array"!==Zn(r))return[new fo(s,r,`array expected, ${Zn(r)} found`)];if(2!==r.length)return[new fo(s,r,`array length 2 expected, length ${r.length} found`)];if(h){if("object"!==Zn(r[0]))return[new fo(s,r,`object expected, ${Zn(r[0])} found`)];if(void 0===r[0].zoom)return[new fo(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new fo(s,r,"object stop key must have value")];const e=Oe(r[0].zoom);if("number"!=typeof e)return[new fo(s,r[0].zoom,"stop zoom values must be numbers")];if(o&&o>e)return[new fo(s,r[0].zoom,"stop zoom values must appear in ascending order")];e!==o&&(o=e,n=void 0,a={}),i=i.concat(mo({key:`${s}[0]`,value:r[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:_o,value:p}}))}else i=i.concat(p({key:`${s}[0]`,value:r[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},r));return ro(Be(r[1]))?i.concat([new fo(`${s}[1]`,r[1],"expressions are not allowed in function stops.")]):i.concat(na({key:`${s}[1]`,value:r[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function p(t,o){const s=Zn(t.value),l=Oe(t.value),h=null!==t.value?t.value:o;if(r){if(s!==r)return[new fo(t.key,h,`${s} stop domain type must match previous stop domain type ${r}`)]}else r=s;if("number"!==s&&"string"!==s&&"boolean"!==s&&"number"!=typeof l&&"string"!=typeof l&&"boolean"!=typeof l)return[new fo(t.key,h,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==i){let r=`number expected, ${s} found`;return $n(e)&&void 0===i&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fo(t.key,h,r)]}return"categorical"!==i||"number"!==s||"number"==typeof l&&isFinite(l)&&Math.floor(l)===l?"categorical"!==i&&"number"===s&&"number"==typeof l&&"number"==typeof n&&void 0!==n&&lnew fo(`${t.key}${e.key}`,t.value,e.message)));const i=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!i.outputDefined())return[new fo(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===t.expressionContext&&"layout"===t.propertyType&&!hr(i))return[new fo(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext)return xo(i,t);if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!cr(i,["zoom","feature-state"]))return[new fo(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!lr(i))return[new fo(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function xo(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const t of e.valueSpec.expression.parameters)i.delete(t);if(0===i.size)return[];const r=[];return t instanceof Di&&i.has(t.name)?[new fo(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild((t=>{r.push(...xo(t,e))})),r)}function bo(t){const e=t.value,i=t.key,r=Zn(e);return"boolean"!==r?[new fo(i,e,`boolean expected, ${r} found`)]:[]}function wo(t){const e=t.key,i=t.value,r=Zn(i);return"string"!==r?[new fo(e,i,`color expected, ${r} found`)]:null===ai.parseCSSColor(i)?[new fo(e,i,`color expected, "${i}" found`)]:[]}function zo(t){const e=t.key,i=t.value,r=t.valueSpec,n=[];return Array.isArray(r.values)?-1===r.values.indexOf(Oe(i))&&n.push(new fo(e,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):-1===Object.keys(r.values).indexOf(Oe(i))&&n.push(new fo(e,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),n}function Mo(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Mo(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function To(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Mo(t)||(t=Ro(t));const i=t;let r=!0;try{r=Eo(i)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\n\tThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\n\tand paste the contents of this message in the report.\n\tThank you!\n\tFilter Expression:\n\t${JSON.stringify(i,null,2)}\n\t `)}const n=De[`filter_${e}`],o=no(r,n);let a=null;if("error"===o.result)throw new Error(o.value.map((t=>`${t.key}: ${t.message}`)).join(", "));a=(t,e,i)=>o.value.evaluate(t,e,{},i);let s=null,l=null;if(r!==i){const t=no(i,n);if("error"===t.result)throw new Error(t.value.map((t=>`${t.key}: ${t.message}`)).join(", "));s=(e,i,r,n,o)=>t.value.evaluate(e,i,{},r,void 0,void 0,n,o),l=!lr(t.value.expression)}return{filter:a,dynamicFilter:s||void 0,needGeometry:Do(r),needFeature:!!l}}function Eo(t){if(!So(t))return t;let e=Be(t);return Co(e),e=Ao(e),e}function Ao(t){if(!Array.isArray(t))return t;const e=ko(t);return!0===e?e:e.map((t=>Ao(t)))}function Co(t){let e=!1;const i=[];if("case"===t[0]){for(let r=1;r",">=","<","<=","to-boolean"]);function ko(t){if(Po.has(t[0]))for(let e=1;ee?1:0}function Do(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e"===e||"<="===e||">="===e?Oo(t[1],t[2],e):"any"===e?Bo(t.slice(1)):"all"===e?["all"].concat(t.slice(1).map(Ro)):"none"===e?["all"].concat(t.slice(1).map(Ro).map(Uo)):"in"===e?Fo(t[1],t.slice(2)):"!in"===e?Uo(Fo(t[1],t.slice(2))):"has"===e?No(t[1]):"!has"===e?Uo(No(t[1])):"within"!==e||t}function Oo(t,e,i){switch(t){case"$type":return[`filter-type-${i}`,e];case"$id":return[`filter-id-${i}`,e];default:return[`filter-${i}`,t,e]}}function Bo(t){return["any"].concat(t.map(Ro))}function Fo(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(Lo)]]:["filter-in-small",t,["literal",e]]}}function No(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Uo(t){return["!",t]}function jo(t){if(Mo(Be(t.value))){const e=t.layerType||"fill";return yo(Re({},t,{expressionContext:"filter",valueSpec:t.styleSpec[`filter_${e}`]}))}return Vo(t)}function Vo(t){const e=t.value,i=t.key;if("array"!==Zn(e))return[new fo(i,e,`array expected, ${Zn(e)} found`)];const r=t.styleSpec;let n,o=[];if(e.length<1)return[new fo(i,e,"filter array must have at least 1 element")];switch(o=o.concat(zo({key:`${i}[0]`,value:e[0],valueSpec:r.filter_operator,style:t.style,styleSpec:t.styleSpec})),Oe(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===Oe(e[1])&&o.push(new fo(i,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":3!==e.length&&o.push(new fo(i,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(n=Zn(e[1]),"string"!==n&&o.push(new fo(`${i}[1]`,e[1],`string expected, ${n} found`)));for(let a=2;a{t in i&&e.push(new fo(r,i[t],`"${t}" is prohibited for ref layers`))})),n.layers.forEach((e=>{Oe(e.id)===s&&(t=e)})),t?t.ref?e.push(new fo(r,i.ref,"ref cannot reference another ref layer")):a=Oe(t.type):"string"==typeof s&&e.push(new fo(r,i.ref,`ref layer "${s}" not found`))}else if("background"!==a&&"sky"!==a)if(i.source){const t=n.sources&&n.sources[i.source],o=t&&Oe(t.type);t?"vector"===o&&"raster"===a?e.push(new fo(r,i.source,`layer "${i.id}" requires a raster source`)):"raster"===o&&"raster"!==a?e.push(new fo(r,i.source,`layer "${i.id}" requires a vector source`)):"vector"!==o||i["source-layer"]?"raster-dem"===o&&"hillshade"!==a?e.push(new fo(r,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!i.paint||!i.paint["line-gradient"]&&!i.paint["line-trim-offset"]||"geojson"===o&&t.lineMetrics||e.push(new fo(r,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new fo(r,i,`layer "${i.id}" must specify a "source-layer"`)):e.push(new fo(r,i.source,`source "${i.source}" not found`))}else e.push(new fo(r,i,'missing required property "source"'));return e=e.concat(mo({key:r,value:i,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":()=>[],type:()=>na({key:`${r}.type`,value:i.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:i,objectKey:"type"}),filter:t=>jo(Re({layerType:a},t)),layout:t=>mo({layer:i,key:t.key,value:t.value,valueSpec:{},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>qo(Re({layerType:a},t))}}),paint:t=>mo({layer:i,key:t.key,value:t.value,valueSpec:{},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":t=>Go(Re({layerType:a},t))}})}})),e}function Ho(t){const e=t.value,i=t.key,r=Zn(e);return"string"!==r?[new fo(i,e,`string expected, ${r} found`)]:[]}const Wo={promoteId:Yo};function Xo(t){const e=t.value,i=t.key,r=t.styleSpec,n=t.style;if(!e.type)return[new fo(i,e,'"type" is required')];const o=Oe(e.type);let a;switch(o){case"vector":case"raster":case"raster-dem":return a=mo({key:i,value:e,valueSpec:r[`source_${o.replace("-","_")}`],style:t.style,styleSpec:r,objectElementValidators:Wo}),a;case"geojson":if(a=mo({key:i,value:e,valueSpec:r.source_geojson,style:n,styleSpec:r,objectElementValidators:Wo}),e.cluster)for(const t in e.clusterProperties){const[r,n]=e.clusterProperties[t],o="string"==typeof r?[r,["accumulated"],["get",t]]:r;a.push(...yo({key:`${i}.${t}.map`,value:n,expressionContext:"cluster-map"})),a.push(...yo({key:`${i}.${t}.reduce`,value:o,expressionContext:"cluster-reduce"}))}return a;case"video":return mo({key:i,value:e,valueSpec:r.source_video,style:n,styleSpec:r});case"image":return mo({key:i,value:e,valueSpec:r.source_image,style:n,styleSpec:r});case"canvas":return[new fo(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return zo({key:`${i}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:r})}}function Yo({key:t,value:e}){if("string"===Zn(e))return Ho({key:t,value:e});{const i=[];for(const r in e)i.push(...Ho({key:`${t}.${r}`,value:e[r]}));return i}}function Ko(t){const e=t.value,i=t.styleSpec,r=i.light,n=t.style;let o=[];const a=Zn(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new fo("light",e,`object expected, ${a} found`)]),o;for(const t in e){const a=t.match(/^(.*)-transition$/);o=a&&r[a[1]]&&r[a[1]].transition?o.concat(na({key:t,value:e[t],valueSpec:i.transition,style:n,styleSpec:i})):r[t]?o.concat(na({key:t,value:e[t],valueSpec:r[t],style:n,styleSpec:i})):o.concat([new fo(t,e[t],`unknown property "${t}"`)])}return o}function Jo(t){const e=t.value,i=t.key,r=t.style,n=t.styleSpec,o=n.terrain;let a=[];const s=Zn(e);if(void 0===e)return a;if("object"!==s)return a=a.concat([new fo("terrain",e,`object expected, ${s} found`)]),a;for(const t in e){const i=t.match(/^(.*)-transition$/);a=i&&o[i[1]]&&o[i[1]].transition?a.concat(na({key:t,value:e[t],valueSpec:n.transition,style:r,styleSpec:n})):o[t]?a.concat(na({key:t,value:e[t],valueSpec:o[t],style:r,styleSpec:n})):a.concat([new fo(t,e[t],`unknown property "${t}"`)])}if(e.source){const t=r.sources&&r.sources[e.source],n=t&&Oe(t.type);t?"raster-dem"!==n&&a.push(new fo(i,e.source,`terrain cannot be used with a source of type ${String(n)}, it only be used with a "raster-dem" source type`)):a.push(new fo(i,e.source,`source "${e.source}" not found`))}else a.push(new fo(i,e,'terrain is missing required property "source"'));return a}function Qo(t){const e=t.value,i=t.style,r=t.styleSpec,n=r.fog;let o=[];const a=Zn(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new fo("fog",e,`object expected, ${a} found`)]),o;for(const t in e){const a=t.match(/^(.*)-transition$/);o=a&&n[a[1]]&&n[a[1]].transition?o.concat(na({key:t,value:e[t],valueSpec:r.transition,style:i,styleSpec:r})):n[t]?o.concat(na({key:t,value:e[t],valueSpec:n[t],style:i,styleSpec:r})):o.concat([new fo(t,e[t],`unknown property "${t}"`)])}return o}function ta(t){return 0===Ho(t).length?[]:yo(t)}function ea(t){return 0===Ho(t).length?[]:yo(t)}function ia(t){const e=t.value,i=t.styleSpec,r=i.projection,n=t.style;let o=[];const a=Zn(e);if("object"===a)for(const t in e)o=o.concat(na({key:t,value:e[t],valueSpec:r[t],style:n,styleSpec:i}));else"string"!==a&&(o=o.concat([new fo("projection",e,`object or string expected, ${a} found`)]));return o}const ra={"*":()=>[],array:vo,boolean:bo,number:_o,color:wo,enum:zo,filter:jo,function:go,layer:Zo,object:mo,source:Xo,light:Ko,terrain:Jo,fog:Qo,string:Ho,formatted:ta,resolvedImage:ea,projection:ia};function na(t){const e=t.value,i=t.valueSpec,r=t.styleSpec;return i.expression&&Hn(Oe(e))?go(t):i.expression&&ro(Be(e))?yo(t):i.type&&ra[i.type]?ra[i.type](t):mo(Re({},t,{valueSpec:i.type?r[i.type]:i}))}function oa(t){const e=t.value,i=t.key,r=Ho(t);return r.length||(-1===e.indexOf("{fontstack}")&&r.push(new fo(i,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&r.push(new fo(i,e,'"glyphs" url must include a "{range}" token'))),r}function aa(t,e=De){return ma(na({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:oa,"*":()=>[]}}))}const sa=t=>ma(Xo(t)),la=t=>ma(Ko(t)),ha=t=>ma(Jo(t)),ca=t=>ma(Qo(t)),ua=t=>ma(Zo(t)),da=t=>ma(jo(t)),pa=t=>ma(Go(t)),fa=t=>ma(qo(t));function ma(t){return t.slice().sort(((t,e)=>t.line&&e.line?t.line-e.line:0))}function va(t,e){let i=!1;if(e&&e.length)for(const r of e)t.fire(new ke(new Error(r.message))),i=!0;return i}var _a=ya,ga=3;function ya(t,e,i){var r=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],e=n[1],i=n[2],this.d=e+2*i;for(var o=0;o=c[p+0]&&r>=c[p+1])?(a[d]=!0,o.push(h[d])):a[d]=!1}}},ya.prototype._forEachCell=function(t,e,i,r,n,o,a,s){for(var l=this._convertToCellCoord(t),h=this._convertToCellCoord(e),c=this._convertToCellCoord(i),u=this._convertToCellCoord(r),d=l;d<=c;d++)for(var p=h;p<=u;p++){var f=this.d*p+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&n.call(this,t,e,i,r,f,o,a,s))return}},ya.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},ya.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ya.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ga+this.cells.length+1+1,i=0,r=0;r=0)continue;const o=t[e];n[e]=Ma(o,i)}t instanceof Error&&(n.message=t.message)}if(n.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(n.$name=r),n}throw new Error("can't serialize object of type "+typeof t)}function Ta(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||wa(t)||za(t)||ArrayBuffer.isView(t)||t instanceof e.ImageData)return t;if(Array.isArray(t))return t.map(Ta);if("object"==typeof t){const e=t.$name||"Object",{klass:i}=xa[e];if(!i)throw new Error(`can't deserialize unregistered class ${e}`);if(i.deserialize)return i.deserialize(t);const r=Object.create(i.prototype);for(const e of Object.keys(t)){if("$name"===e)continue;const i=t[e];r[e]=Ta(i)}return r}throw new Error("can't deserialize object of type "+typeof t)}class Ea{constructor(){this.first=!0}update(t,e){const i=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=i,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=i,!0):(this.lastFloorZoom>i?(this.lastIntegerZoom=i+1,this.lastIntegerZoomTime=e):this.lastFloorZoomt>=128&&t<=255,Arabic:t=>t>=1536&&t<=1791,"Arabic Supplement":t=>t>=1872&&t<=1919,"Arabic Extended-A":t=>t>=2208&&t<=2303,"Hangul Jamo":t=>t>=4352&&t<=4607,"Unified Canadian Aboriginal Syllabics":t=>t>=5120&&t<=5759,Khmer:t=>t>=6016&&t<=6143,"Unified Canadian Aboriginal Syllabics Extended":t=>t>=6320&&t<=6399,"General Punctuation":t=>t>=8192&&t<=8303,"Letterlike Symbols":t=>t>=8448&&t<=8527,"Number Forms":t=>t>=8528&&t<=8591,"Miscellaneous Technical":t=>t>=8960&&t<=9215,"Control Pictures":t=>t>=9216&&t<=9279,"Optical Character Recognition":t=>t>=9280&&t<=9311,"Enclosed Alphanumerics":t=>t>=9312&&t<=9471,"Geometric Shapes":t=>t>=9632&&t<=9727,"Miscellaneous Symbols":t=>t>=9728&&t<=9983,"Miscellaneous Symbols and Arrows":t=>t>=11008&&t<=11263,"CJK Radicals Supplement":t=>t>=11904&&t<=12031,"Kangxi Radicals":t=>t>=12032&&t<=12255,"Ideographic Description Characters":t=>t>=12272&&t<=12287,"CJK Symbols and Punctuation":t=>t>=12288&&t<=12351,Hiragana:t=>t>=12352&&t<=12447,Katakana:t=>t>=12448&&t<=12543,Bopomofo:t=>t>=12544&&t<=12591,"Hangul Compatibility Jamo":t=>t>=12592&&t<=12687,Kanbun:t=>t>=12688&&t<=12703,"Bopomofo Extended":t=>t>=12704&&t<=12735,"CJK Strokes":t=>t>=12736&&t<=12783,"Katakana Phonetic Extensions":t=>t>=12784&&t<=12799,"Enclosed CJK Letters and Months":t=>t>=12800&&t<=13055,"CJK Compatibility":t=>t>=13056&&t<=13311,"CJK Unified Ideographs Extension A":t=>t>=13312&&t<=19903,"Yijing Hexagram Symbols":t=>t>=19904&&t<=19967,"CJK Unified Ideographs":t=>t>=19968&&t<=40959,"Yi Syllables":t=>t>=40960&&t<=42127,"Yi Radicals":t=>t>=42128&&t<=42191,"Hangul Jamo Extended-A":t=>t>=43360&&t<=43391,"Hangul Syllables":t=>t>=44032&&t<=55215,"Hangul Jamo Extended-B":t=>t>=55216&&t<=55295,"Private Use Area":t=>t>=57344&&t<=63743,"CJK Compatibility Ideographs":t=>t>=63744&&t<=64255,"Arabic Presentation Forms-A":t=>t>=64336&&t<=65023,"Vertical Forms":t=>t>=65040&&t<=65055,"CJK Compatibility Forms":t=>t>=65072&&t<=65103,"Small Form Variants":t=>t>=65104&&t<=65135,"Arabic Presentation Forms-B":t=>t>=65136&&t<=65279,"Halfwidth and Fullwidth Forms":t=>t>=65280&&t<=65519};function Ca(t){for(const e of t)if(ka(e.charCodeAt(0)))return!0;return!1}function Sa(t){for(const e of t)if(!Ia(e.charCodeAt(0)))return!1;return!0}function Ia(t){return!(Aa.Arabic(t)||Aa["Arabic Supplement"](t)||Aa["Arabic Extended-A"](t)||Aa["Arabic Presentation Forms-A"](t)||Aa["Arabic Presentation Forms-B"](t))}function Pa(t){return!(t<11904||!(Aa["Bopomofo Extended"](t)||Aa.Bopomofo(t)||Aa["CJK Compatibility Forms"](t)||Aa["CJK Compatibility Ideographs"](t)||Aa["CJK Compatibility"](t)||Aa["CJK Radicals Supplement"](t)||Aa["CJK Strokes"](t)||Aa["CJK Symbols and Punctuation"](t)||Aa["CJK Unified Ideographs Extension A"](t)||Aa["CJK Unified Ideographs"](t)||Aa["Enclosed CJK Letters and Months"](t)||Aa["Halfwidth and Fullwidth Forms"](t)||Aa.Hiragana(t)||Aa["Ideographic Description Characters"](t)||Aa["Kangxi Radicals"](t)||Aa["Katakana Phonetic Extensions"](t)||Aa.Katakana(t)||Aa["Vertical Forms"](t)||Aa["Yi Radicals"](t)||Aa["Yi Syllables"](t)))}function ka(t){return!(746!==t&&747!==t&&(t<4352||!(Aa["Bopomofo Extended"](t)||Aa.Bopomofo(t)||Aa["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||Aa["CJK Compatibility Ideographs"](t)||Aa["CJK Compatibility"](t)||Aa["CJK Radicals Supplement"](t)||Aa["CJK Strokes"](t)||!(!Aa["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Aa["CJK Unified Ideographs Extension A"](t)||Aa["CJK Unified Ideographs"](t)||Aa["Enclosed CJK Letters and Months"](t)||Aa["Hangul Compatibility Jamo"](t)||Aa["Hangul Jamo Extended-A"](t)||Aa["Hangul Jamo Extended-B"](t)||Aa["Hangul Jamo"](t)||Aa["Hangul Syllables"](t)||Aa.Hiragana(t)||Aa["Ideographic Description Characters"](t)||Aa.Kanbun(t)||Aa["Kangxi Radicals"](t)||Aa["Katakana Phonetic Extensions"](t)||Aa.Katakana(t)&&12540!==t||!(!Aa["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Aa["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Aa["Unified Canadian Aboriginal Syllabics"](t)||Aa["Unified Canadian Aboriginal Syllabics Extended"](t)||Aa["Vertical Forms"](t)||Aa["Yijing Hexagram Symbols"](t)||Aa["Yi Syllables"](t)||Aa["Yi Radicals"](t))))}function La(t){return!!(Aa["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Aa["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Aa["Letterlike Symbols"](t)||Aa["Number Forms"](t)||Aa["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Aa["Control Pictures"](t)&&9251!==t||Aa["Optical Character Recognition"](t)||Aa["Enclosed Alphanumerics"](t)||Aa["Geometric Shapes"](t)||Aa["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Aa["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Aa["CJK Symbols and Punctuation"](t)||Aa.Katakana(t)||Aa["Private Use Area"](t)||Aa["CJK Compatibility Forms"](t)||Aa["Small Form Variants"](t)||Aa["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}function Da(t){return!(ka(t)||La(t))}function Ra(t){return Aa.Arabic(t)||Aa["Arabic Supplement"](t)||Aa["Arabic Extended-A"](t)||Aa["Arabic Presentation Forms-A"](t)||Aa["Arabic Presentation Forms-B"](t)}function Oa(t){return t>=1424&&t<=2303||Aa["Arabic Presentation Forms-A"](t)||Aa["Arabic Presentation Forms-B"](t)}function Ba(t,e){return!(!e&&Oa(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Aa.Khmer(t))}function Fa(t){for(const e of t)if(Oa(e.charCodeAt(0)))return!0;return!1}function Na(t,e){for(const i of t)if(!Ba(i.charCodeAt(0),e))return!1;return!0}const Ua={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"};let ja=null,Va=Ua.unavailable,$a=null;const Ga=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Va=Ua.error),ja&&ja(t)};function qa(){Za.fire(new Pe("pluginStateChange",{pluginStatus:Va,pluginURL:$a}))}const Za=new Le,Ha=function(){return Va},Wa=function(t){return t({pluginStatus:Va,pluginURL:$a}),Za.on("pluginStateChange",t),t},Xa=function(t,e,i=!1){if(Va===Ua.deferred||Va===Ua.loading||Va===Ua.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");$a=lt.resolveURL(t),Va=Ua.deferred,ja=e,qa(),i||Ya()},Ya=function(){if(Va!==Ua.deferred||!$a)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Va=Ua.loading,qa(),$a&&ge({url:$a},(t=>{t?Ga(t):(Va=Ua.loaded,qa())}))},Ka={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Va===Ua.loaded||null!=Ka.applyArabicShaping,isLoading:()=>Va===Ua.loading,setState(t){Va=t.pluginStatus,$a=t.pluginURL},isParsed:()=>null!=Ka.applyArabicShaping&&null!=Ka.processBidirectionalText&&null!=Ka.processStyledBidirectionalText,getPluginURL:()=>$a},Ja=function(){Ka.isLoading()||Ka.isLoaded()||"deferred"!==Ha()||Ya()};class Qa{constructor(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition,this.pitch=e.pitch):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ea,this.transition={},this.pitch=0)}isSupportedScript(t){return Na(t,Ka.isLoaded())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,e=t-Math.floor(t),i=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*i}:{fromScale:.5,toScale:1,t:1-(1-i)*e}}}class ts{constructor(t,e){this.property=t,this.value=e,this.expression=ho(void 0===e?t.specification.default:e,t.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(t,e,i){return this.property.possiblyEvaluate(this,t,e,i)}}class es{constructor(t){this.property=t,this.value=new ts(t,void 0)}transitioned(t,e){return new rs(this.property,this.value,e,E({},t.transition,this.transition),t.now)}untransitioned(){return new rs(this.property,this.value,null,{},0)}}class is{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return F(this._values[t].value.value)}setValue(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new es(this._values[t].property)),this._values[t].value=new ts(this._values[t].property,null===e?void 0:F(e))}getTransition(t){return F(this._values[t].transition)}setTransition(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new es(this._values[t].property)),this._values[t].transition=F(e)||void 0}serialize(){const t={};for(const e of Object.keys(this._values)){const i=this.getValue(e);void 0!==i&&(t[e]=i);const r=this.getTransition(e);void 0!==r&&(t[`${e}-transition`]=r)}return t}transitioned(t,e){const i=new ns(this._properties);for(const r of Object.keys(this._values))i._values[r]=this._values[r].transitioned(t,e._values[r]);return i}untransitioned(){const t=new ns(this._properties);for(const e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}}class rs{constructor(t,e,i,r,n){const o=r.delay||0,a=r.duration||0;n=n||0,this.property=t,this.value=e,this.begin=n+o,this.end=this.begin+a,t.specification.transition&&(r.delay||r.duration)&&(this.prior=i)}possiblyEvaluate(t,e,i){const r=t.now||0,n=this.value.possiblyEvaluate(t,e,i),o=this.prior;if(o){if(r>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(rr.zoomHistory.lastIntegerZoom?{from:t,to:e,other:i}:{from:i,to:e,other:t}}interpolate(t){return t}}class us{constructor(t){this.specification=t}possiblyEvaluate(t,e,i,r){if(void 0!==t.value){if("constant"===t.expression.kind){const n=t.expression.evaluate(e,null,{},i,r);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new Qa(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Qa(Math.floor(e.zoom),e)),t.expression.evaluate(new Qa(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,i,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:i,to:e}}interpolate(t){return t}}class ds{constructor(t){this.specification=t}possiblyEvaluate(t,e,i,r){return!!t.expression.evaluate(e,null,{},i,r)}interpolate(){return!1}}class ps{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const e=new Qa(0,{});for(const i in t){const r=t[i];r.specification.overridable&&this.overridableProperties.push(i);const n=this.defaultPropertyValues[i]=new ts(r,void 0),o=this.defaultTransitionablePropertyValues[i]=new es(r);this.defaultTransitioningPropertyValues[i]=o.untransitioned(),this.defaultPossiblyEvaluatedValues[i]=n.possiblyEvaluate(e)}}}function fs(t,e){return 256*(t=y(Math.floor(t),0,255))+(e=y(Math.floor(e),0,255))}ba(hs,"DataDrivenProperty"),ba(ls,"DataConstantProperty"),ba(cs,"CrossFadedDataDrivenProperty"),ba(us,"CrossFadedProperty"),ba(ds,"ColorRampProperty");const ms={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class vs{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}const _s=128,gs=5;class ys{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*gs),_s),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function xs(t,e=1){let i=0,r=0;return{members:t.map((t=>{const n=bs(t.type),o=i=ws(i,Math.max(e,n)),a=t.components||1;return r=Math.max(r,n),i+=n*a,{name:t.name,type:t.type,components:a,offset:o}})),size:ws(i,Math.max(r,e)),alignment:e}}function bs(t){return ms[t].BYTES_PER_ELEMENT}function ws(t,e){return Math.ceil(t/e)*e}class zs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.int16[r+0]=e,this.int16[r+1]=i,t}}zs.prototype.bytesPerElement=4,ba(zs,"StructArrayLayout2i4");class Ms extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const n=3*t;return this.int16[n+0]=e,this.int16[n+1]=i,this.int16[n+2]=r,t}}Ms.prototype.bytesPerElement=6,ba(Ms,"StructArrayLayout3i6");class Ts extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)}emplace(t,e,i,r,n){const o=4*t;return this.int16[o+0]=e,this.int16[o+1]=i,this.int16[o+2]=r,this.int16[o+3]=n,t}}Ts.prototype.bytesPerElement=8,ba(Ts,"StructArrayLayout4i8");class Es extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,n,o,a)}emplace(t,e,i,r,n,o,a,s){const l=6*t,h=12*t,c=3*t;return this.int16[l+0]=e,this.int16[l+1]=i,this.uint8[h+4]=r,this.uint8[h+5]=n,this.uint8[h+6]=o,this.uint8[h+7]=a,this.float32[c+2]=s,t}}Es.prototype.bytesPerElement=12,ba(Es,"StructArrayLayout2i4ub1f12");class As extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)}emplace(t,e,i,r,n){const o=4*t;return this.float32[o+0]=e,this.float32[o+1]=i,this.float32[o+2]=r,this.float32[o+3]=n,t}}As.prototype.bytesPerElement=16,ba(As,"StructArrayLayout4f16");class Cs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a,s,l,h){const c=this.length;return this.resize(c+1),this.emplace(c,t,e,i,r,n,o,a,s,l,h)}emplace(t,e,i,r,n,o,a,s,l,h,c){const u=10*t;return this.uint16[u+0]=e,this.uint16[u+1]=i,this.uint16[u+2]=r,this.uint16[u+3]=n,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,this.uint16[u+8]=h,this.uint16[u+9]=c,t}}Cs.prototype.bytesPerElement=20,ba(Cs,"StructArrayLayout10ui20");class Ss extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a,s){const l=this.length;return this.resize(l+1),this.emplace(l,t,e,i,r,n,o,a,s)}emplace(t,e,i,r,n,o,a,s,l){const h=8*t;return this.uint16[h+0]=e,this.uint16[h+1]=i,this.uint16[h+2]=r,this.uint16[h+3]=n,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,t}}Ss.prototype.bytesPerElement=16,ba(Ss,"StructArrayLayout8ui16");class Is extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,n,o)}emplace(t,e,i,r,n,o,a){const s=6*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.int16[s+2]=r,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t}}Is.prototype.bytesPerElement=12,ba(Is,"StructArrayLayout6i12");class Ps extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a,s,l,h,c,u){const d=this.length;return this.resize(d+1),this.emplace(d,t,e,i,r,n,o,a,s,l,h,c,u)}emplace(t,e,i,r,n,o,a,s,l,h,c,u,d){const p=12*t;return this.int16[p+0]=e,this.int16[p+1]=i,this.int16[p+2]=r,this.int16[p+3]=n,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=h,this.int16[p+9]=c,this.int16[p+10]=u,this.int16[p+11]=d,t}}Ps.prototype.bytesPerElement=24,ba(Ps,"StructArrayLayout4i4ui4i24");class ks extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o){const a=this.length;return this.resize(a+1),this.emplace(a,t,e,i,r,n,o)}emplace(t,e,i,r,n,o,a){const s=10*t,l=5*t;return this.int16[s+0]=e,this.int16[s+1]=i,this.int16[s+2]=r,this.float32[l+2]=n,this.float32[l+3]=o,this.float32[l+4]=a,t}}ks.prototype.bytesPerElement=20,ba(ks,"StructArrayLayout3i3f20");class Ls extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const i=1*t;return this.uint32[i+0]=e,t}}Ls.prototype.bytesPerElement=4,ba(Ls,"StructArrayLayout1ul4");class Ds extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a,s,l,h,c,u,d){const p=this.length;return this.resize(p+1),this.emplace(p,t,e,i,r,n,o,a,s,l,h,c,u,d)}emplace(t,e,i,r,n,o,a,s,l,h,c,u,d,p){const f=20*t,m=10*t;return this.int16[f+0]=e,this.int16[f+1]=i,this.int16[f+2]=r,this.int16[f+3]=n,this.int16[f+4]=o,this.float32[m+3]=a,this.float32[m+4]=s,this.float32[m+5]=l,this.float32[m+6]=h,this.int16[f+14]=c,this.uint32[m+8]=u,this.uint16[f+18]=d,this.uint16[f+19]=p,t}}Ds.prototype.bytesPerElement=40,ba(Ds,"StructArrayLayout5i4f1i1ul2ui40");class Rs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,n,o,a)}emplace(t,e,i,r,n,o,a,s){const l=8*t;return this.int16[l+0]=e,this.int16[l+1]=i,this.int16[l+2]=r,this.int16[l+4]=n,this.int16[l+5]=o,this.int16[l+6]=a,this.int16[l+7]=s,t}}Rs.prototype.bytesPerElement=16,ba(Rs,"StructArrayLayout3i2i2i16");class Os extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r,n)}emplace(t,e,i,r,n,o){const a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=i,this.float32[a+2]=r,this.int16[s+6]=n,this.int16[s+7]=o,t}}Os.prototype.bytesPerElement=16,ba(Os,"StructArrayLayout2f1f2i16");class Bs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)}emplace(t,e,i,r,n){const o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=i,this.float32[a+1]=r,this.float32[a+2]=n,t}}Bs.prototype.bytesPerElement=12,ba(Bs,"StructArrayLayout2ub2f12");class Fs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const n=3*t;return this.float32[n+0]=e,this.float32[n+1]=i,this.float32[n+2]=r,t}}Fs.prototype.bytesPerElement=12,ba(Fs,"StructArrayLayout3f12");class Ns extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i){const r=this.length;return this.resize(r+1),this.emplace(r,t,e,i)}emplace(t,e,i,r){const n=3*t;return this.uint16[n+0]=e,this.uint16[n+1]=i,this.uint16[n+2]=r,t}}Ns.prototype.bytesPerElement=6,ba(Ns,"StructArrayLayout3ui6");class Us extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x){const b=this.length;return this.resize(b+1),this.emplace(b,t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x)}emplace(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x,b){const w=30*t,z=15*t,M=60*t;return this.int16[w+0]=e,this.int16[w+1]=i,this.int16[w+2]=r,this.float32[z+2]=n,this.float32[z+3]=o,this.uint16[w+8]=a,this.uint16[w+9]=s,this.uint32[z+5]=l,this.uint32[z+6]=h,this.uint32[z+7]=c,this.uint16[w+16]=u,this.uint16[w+17]=d,this.uint16[w+18]=p,this.float32[z+10]=f,this.float32[z+11]=m,this.uint8[M+48]=v,this.uint8[M+49]=_,this.uint8[M+50]=g,this.uint32[z+13]=y,this.int16[w+28]=x,this.uint8[M+58]=b,t}}Us.prototype.bytesPerElement=60,ba(Us,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class js extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x,b,w,z,M,T,E,A,C,S){const I=this.length;return this.resize(I+1),this.emplace(I,t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x,b,w,z,M,T,E,A,C,S)}emplace(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x,b,w,z,M,T,E,A,C,S,I){const P=38*t,k=19*t;return this.int16[P+0]=e,this.int16[P+1]=i,this.int16[P+2]=r,this.float32[k+2]=n,this.float32[k+3]=o,this.int16[P+8]=a,this.int16[P+9]=s,this.int16[P+10]=l,this.int16[P+11]=h,this.int16[P+12]=c,this.int16[P+13]=u,this.uint16[P+14]=d,this.uint16[P+15]=p,this.uint16[P+16]=f,this.uint16[P+17]=m,this.uint16[P+18]=v,this.uint16[P+19]=_,this.uint16[P+20]=g,this.uint16[P+21]=y,this.uint16[P+22]=x,this.uint16[P+23]=b,this.uint16[P+24]=w,this.uint16[P+25]=z,this.uint16[P+26]=M,this.uint16[P+27]=T,this.uint16[P+28]=E,this.uint32[k+15]=A,this.float32[k+16]=C,this.float32[k+17]=S,this.float32[k+18]=I,t}}js.prototype.bytesPerElement=76,ba(js,"StructArrayLayout3i2f6i15ui1ul3f76");class Vs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const i=1*t;return this.float32[i+0]=e,t}}Vs.prototype.bytesPerElement=4,ba(Vs,"StructArrayLayout1f4");class $s extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n,o,a){const s=this.length;return this.resize(s+1),this.emplace(s,t,e,i,r,n,o,a)}emplace(t,e,i,r,n,o,a,s){const l=7*t;return this.float32[l+0]=e,this.float32[l+1]=i,this.float32[l+2]=r,this.float32[l+3]=n,this.float32[l+4]=o,this.float32[l+5]=a,this.float32[l+6]=s,t}}$s.prototype.bytesPerElement=28,ba($s,"StructArrayLayout7f28");class Gs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,i,r,n){const o=this.length;return this.resize(o+1),this.emplace(o,t,e,i,r,n)}emplace(t,e,i,r,n,o){const a=5*t;return this.float32[a+0]=e,this.float32[a+1]=i,this.float32[a+2]=r,this.float32[a+3]=n,this.float32[a+4]=o,t}}Gs.prototype.bytesPerElement=20,ba(Gs,"StructArrayLayout5f20");class qs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,i,r){const n=this.length;return this.resize(n+1),this.emplace(n,t,e,i,r)}emplace(t,e,i,r,n){const o=3*t,a=6*t;return this.uint32[o+0]=e,this.uint16[a+2]=i,this.uint16[a+3]=r,this.uint16[a+4]=n,t}}qs.prototype.bytesPerElement=12,ba(qs,"StructArrayLayout1ul3ui12");class Zs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.uint16[r+0]=e,this.uint16[r+1]=i,t}}Zs.prototype.bytesPerElement=4,ba(Zs,"StructArrayLayout2ui4");class Hs extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){const i=1*t;return this.uint16[i+0]=e,t}}Hs.prototype.bytesPerElement=2,ba(Hs,"StructArrayLayout1ui2");class Ws extends ys{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){const i=this.length;return this.resize(i+1),this.emplace(i,t,e)}emplace(t,e,i){const r=2*t;return this.float32[r+0]=e,this.float32[r+1]=i,t}}Ws.prototype.bytesPerElement=8,ba(Ws,"StructArrayLayout2f8");class Xs extends vs{get a_pos_30(){return this._structArray.int16[this._pos2+0]}get a_pos_31(){return this._structArray.int16[this._pos2+1]}get a_pos_32(){return this._structArray.int16[this._pos2+2]}get a_pos_normal_30(){return this._structArray.int16[this._pos2+3]}get a_pos_normal_31(){return this._structArray.int16[this._pos2+4]}get a_pos_normal_32(){return this._structArray.int16[this._pos2+5]}}Xs.prototype.size=12;class Ys extends Is{get(t){return new Xs(this,t)}}ba(Ys,"FillExtrusionExtArray");class Ks extends vs{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}Ks.prototype.size=40;class Js extends Ds{get(t){return new Ks(this,t)}}ba(Js,"CollisionBoxArray");class Qs extends vs{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(t){this._structArray.uint8[this._pos1+49]=t}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(t){this._structArray.uint8[this._pos1+50]=t}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(t){this._structArray.uint32[this._pos4+13]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(t){this._structArray.uint8[this._pos1+58]=t}}Qs.prototype.size=60;class tl extends Us{get(t){return new Qs(this,t)}}ba(tl,"PlacedSymbolArray");class el extends vs{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(t){this._structArray.uint32[this._pos4+15]=t}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}el.prototype.size=76;class il extends js{get(t){return new el(this,t)}}ba(il,"SymbolInstanceArray");class rl extends Vs{getoffsetX(t){return this.float32[1*t+0]}}ba(rl,"GlyphOffsetArray");class nl extends Ms{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}ba(nl,"SymbolLineVertexArray");class ol extends vs{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}ol.prototype.size=12;class al extends qs{get(t){return new ol(this,t)}}ba(al,"FeatureIndexArray");class sl extends vs{get a_centroid_pos0(){return this._structArray.uint16[this._pos2+0]}get a_centroid_pos1(){return this._structArray.uint16[this._pos2+1]}}sl.prototype.size=4;class ll extends Zs{get(t){return new sl(this,t)}}ba(ll,"FillExtrusionCentroidArray");class hl extends vs{get a_pos_30(){return this._structArray.int16[this._pos2+0]}get a_pos_31(){return this._structArray.int16[this._pos2+1]}get a_pos_32(){return this._structArray.int16[this._pos2+2]}get a_pos_normal_30(){return this._structArray.int16[this._pos2+3]}get a_pos_normal_31(){return this._structArray.int16[this._pos2+4]}get a_pos_normal_32(){return this._structArray.int16[this._pos2+5]}}hl.prototype.size=12;class cl extends Is{get(t){return new hl(this,t)}}ba(cl,"CircleGlobeExtArray");const ul=xs([{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"}]),dl=xs([{name:"a_dash_to",components:4,type:"Uint16"},{name:"a_dash_from",components:4,type:"Uint16"}]);var pl=oi((function(t){function e(t,e){var i,r,n,o,a,s,l,h;for(i=3&t.length,r=t.length-i,n=e,a=3432918353,s=461845907,h=0;h>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&t.charCodeAt(h+2))<<16;case 2:l^=(255&t.charCodeAt(h+1))<<8;case 1:n^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(h)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}t.exports=e})),fl=oi((function(t){function e(t,e){for(var i,r=t.length,n=e^r,o=0;r>=4;)i=1540483477*(65535&(i=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(i>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(i=1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:n^=(255&t.charCodeAt(o+2))<<16;case 2:n^=(255&t.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}t.exports=e})),ml=pl,vl=pl,_l=fl;ml.murmur3=vl,ml.murmur2=_l;class gl{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,e,i,r){this.ids.push(yl(t)),this.positions.push(e,i,r)}getPositions(t){const e=yl(t);let i=0,r=this.ids.length-1;for(;i>1;this.ids[t]>=e?r=t:i=t+1}const n=[];for(;this.ids[i]===e;){const t=this.positions[3*i],e=this.positions[3*i+1],r=this.positions[3*i+2];n.push({index:t,start:e,end:r}),i++}return n}static serialize(t,e){const i=new Float64Array(t.ids),r=new Uint32Array(t.positions);return xl(i,r,0,i.length-1),e&&e.push(i.buffer,r.buffer),{ids:i,positions:r}}static deserialize(t){const e=new gl;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e}}function yl(t){const e=+t;return!isNaN(e)&&Number.MIN_SAFE_INTEGER<=e&&e<=Number.MAX_SAFE_INTEGER?e:ml(String(t))}function xl(t,e,i,r){for(;i>1];let o=i-1,a=r+1;for(;;){do{o++}while(t[o]n);if(o>=a)break;bl(t,o,a),bl(e,3*o,3*a),bl(e,3*o+1,3*a+1),bl(e,3*o+2,3*a+2)}a-i`u_${t}`)),this.type=i}setUniform(t,e,i){t.set(i.constantOr(this.value))}getBinding(t,e,i){return"color"===this.type?new Cl(t,e):new Ml(t,e)}}class Bl{constructor(t,e){this.uniformNames=e.map((t=>`u_${t}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio||1,this.pixelRatioTo=t.pixelRatio||1,this.patternFrom=e.tl.concat(e.br),this.patternTo=t.tl.concat(t.br)}setUniform(t,e,i,r){const n="u_pattern_to"===r||"u_dash_to"===r?this.patternTo:"u_pattern_from"===r||"u_dash_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;n&&t.set(n)}getBinding(t,e,i){return"u_pattern_from"===i||"u_pattern_to"===i||"u_dash_from"===i||"u_dash_to"===i?new Al(t,e):new Ml(t,e)}}class Fl{constructor(t,e,i,r){this.expression=t,this.type=i,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===i?2:1,offset:0}))),this.paintVertexArray=new r}populatePaintArray(t,e,i,r,n,o){const a=this.paintVertexArray.length,s=this.expression.evaluate(new Qa(0),e,{},n,r,o);this.paintVertexArray.resize(t),this._setPaintValue(a,t,s)}updatePaintArray(t,e,i,r,n){const o=this.expression.evaluate({zoom:0},i,r,void 0,n);this._setPaintValue(t,e,o)}_setPaintValue(t,e,i){if("color"===this.type){const r=Rl(i);for(let i=t;i`u_${t}_t`)),this.type=i,this.useIntegerZoom=r,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map((t=>({name:`a_${t}`,type:"Float32",components:"color"===i?4:2,offset:0}))),this.paintVertexArray=new o}populatePaintArray(t,e,i,r,n,o){const a=this.expression.evaluate(new Qa(this.zoom),e,{},n,r,o),s=this.expression.evaluate(new Qa(this.zoom+1),e,{},n,r,o),l=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(l,t,a,s)}updatePaintArray(t,e,i,r,n){const o=this.expression.evaluate({zoom:this.zoom},i,r,void 0,n),a=this.expression.evaluate({zoom:this.zoom+1},i,r,void 0,n);this._setPaintValue(t,e,o,a)}_setPaintValue(t,e,i,r){if("color"===this.type){const n=Rl(i),o=Rl(r);for(let i=t;i!0)){this.binders={},this._buffers=[];const r=[];for(const n in t.paint._values){if(!i(n))continue;const o=t.paint.get(n);if(!(o instanceof as&&$n(o.property.specification)))continue;const a=Gl(n,t.type),s=o.value,l=o.property.specification.type,h=o.property.useIntegerZoom,c=o.property.specification["property-type"],u="cross-faded"===c||"cross-faded-data-driven"===c,d="line-dasharray"===String(n)&&"constant"!==t.layout.get("line-cap").value.kind;if("constant"!==s.kind||d)if("source"===s.kind||d||u){const i=Hl(n,l,"source");this.binders[n]=u?new Ul(s,a,l,h,e,i,t.id):new Fl(s,a,l,i),r.push(`/a_${n}`)}else{const t=Hl(n,l,"composite");this.binders[n]=new Nl(s,a,l,h,e,t),r.push(`/z_${n}`)}else this.binders[n]=u?new Bl(s.value,a):new Ol(s.value,a,l),r.push(`/u_${n}`)}this.cacheKey=r.sort().join("")}getMaxValue(t){const e=this.binders[t];return e instanceof Fl||e instanceof Nl?e.maxValue:0}populatePaintArrays(t,e,i,r,n,o){for(const a in this.binders){const s=this.binders[a];(s instanceof Fl||s instanceof Nl||s instanceof Ul)&&s.populatePaintArray(t,e,i,r,n,o)}}setConstantPatternPositions(t,e){for(const i in this.binders){const r=this.binders[i];r instanceof Bl&&r.setConstantPatternPositions(t,e)}}updatePaintArrays(t,e,i,r,n,o){let a=!1;for(const s in t){const l=e.getPositions(s);for(const e of l){const l=i.feature(e.index);for(const i in this.binders){const h=this.binders[i];if((h instanceof Fl||h instanceof Nl||h instanceof Ul)&&!0===h.expression.isStateDependent){const c=r.paint.get(i);h.expression=c.value,h.updatePaintArray(e.start,e.end,l,t[s],n,o),a=!0}}}}return a}defines(){const t=[];for(const e in this.binders){const i=this.binders[e];(i instanceof Ol||i instanceof Bl)&&t.push(...i.uniformNames.map((t=>`#define HAS_UNIFORM_${t}`)))}return t}getBinderAttributes(){const t=[];for(const e in this.binders){const i=this.binders[e];if(i instanceof Fl||i instanceof Nl||i instanceof Ul)for(let e=0;e!0)){this.programConfigurations={};for(const r of t)this.programConfigurations[r.id]=new jl(r,e,i);this.needsUpload=!1,this._featureMap=new gl,this._bufferOffset=0}populatePaintArrays(t,e,i,r,n,o,a){for(const i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(t,e,r,n,o,a);void 0!==e.id&&this._featureMap.add(e.id,i,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,i,r,n){for(const o of i)this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,this._featureMap,e,o,r,n)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}const $l={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"line-dasharray":["dash_to","dash_from"]};function Gl(t,e){return $l[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}const ql={"line-pattern":{source:Cs,composite:Cs},"fill-pattern":{source:Cs,composite:Cs},"fill-extrusion-pattern":{source:Cs,composite:Cs},"line-dasharray":{source:Ss,composite:Ss}},Zl={color:{source:Ws,composite:As},number:{source:Vs,composite:Ws}};function Hl(t,e,i){const r=ql[t];return r&&r[i]||Zl[e][i]}ba(Ol,"ConstantBinder"),ba(Bl,"CrossFadedConstantBinder"),ba(Fl,"SourceExpressionBinder"),ba(Ul,"CrossFadedCompositeBinder"),ba(Nl,"CompositeExpressionBinder"),ba(jl,"ProgramConfiguration",{omit:["_buffers"]}),ba(Vl,"ProgramConfigurationSet");const Wl="-transition";class Xl extends Le{constructor(t,e){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&"sky"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),e.layout&&(this._unevaluatedLayout=new os(e.layout)),e.paint)){this._transitionablePaint=new is(e.paint);for(const e in t.paint)this.setPaintProperty(e,t.paint[e],{validate:!1});for(const e in t.layout)this.setLayoutProperty(e,t.layout[e],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ss(e.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,e,i={}){if(null!=e){const r=`layers.${this.id}.layout.${t}`;if(this._validate(fa,r,t,e,i))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e}getPaintProperty(t){return R(t,Wl)?this._transitionablePaint.getTransition(t.slice(0,-Wl.length)):this._transitionablePaint.getValue(t)}setPaintProperty(t,e,i={}){if(null!=e){const r=`layers.${this.id}.paint.${t}`;if(this._validate(pa,r,t,e,i))return!1}if(R(t,Wl))return this._transitionablePaint.setTransition(t.slice(0,-Wl.length),e||void 0),!1;{const i=this._transitionablePaint._values[t],r="cross-faded-data-driven"===i.property.specification["property-type"],n=i.value.isDataDriven(),o=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);const a=this._transitionablePaint._values[t].value;return a.isDataDriven()||n||r||this._handleOverridablePaintPropertyUpdate(t,o,a)}}_handleSpecialPaintPropertyUpdate(t){}getProgramIds(){return null}getProgramConfiguration(t){return null}_handleOverridablePaintPropertyUpdate(t,e,i){return!1}isHidden(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){const t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),B(t,((t,e)=>!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)))}_validate(t,e,i,r,n={}){return(!n||!1!==n.validate)&&va(this,t.call(aa,{key:e,layerType:this.type,objectKey:i,value:r,styleSpec:De,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const e=this.paint.get(t);if(e instanceof as&&$n(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=To(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const Yl=xs([{name:"a_pos",components:2,type:"Int16"}],4),Kl=xs([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Jl{constructor(t=[]){this.segments=t}prepareSegment(t,e,i,r){let n=this.segments[this.segments.length-1];return t>Jl.MAX_VERTEX_ARRAY_LENGTH&&V(`Max vertices per segment is ${Jl.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}`),(!n||n.vertexLength+t>Jl.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==r)&&(n={vertexOffset:e.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0},void 0!==r&&(n.sortKey=r),this.segments.push(n)),n}get(){return this.segments}destroy(){for(const t of this.segments)for(const e in t.vaos)t.vaos[e].destroy()}static simpleSegment(t,e,i,r){return new Jl([{vertexOffset:t,primitiveOffset:e,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])}}Jl.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ba(Jl,"SegmentVector");var Ql=8192;class th{constructor(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))}setNorthEast(t){return this._ne=t instanceof ih?new ih(t.lng,t.lat):ih.convert(t),this}setSouthWest(t){return this._sw=t instanceof ih?new ih(t.lng,t.lat):ih.convert(t),this}extend(t){const e=this._sw,i=this._ne;let r,n;if(t instanceof ih)r=t,n=t;else{if(!(t instanceof th)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){const e=t;return this.extend(th.convert(e))}{const e=t;return this.extend(ih.convert(e))}}return this}if(r=t._sw,n=t._ne,!r||!n)return this}return e||i?(e.lng=Math.min(r.lng,e.lng),e.lat=Math.min(r.lat,e.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new ih(r.lng,r.lat),this._ne=new ih(n.lng,n.lat)),this}getCenter(){return new ih((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new ih(this.getWest(),this.getNorth())}getSouthEast(){return new ih(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:e,lat:i}=ih.convert(t),r=this._sw.lat<=i&&i<=this._ne.lat;let n=this._sw.lng<=e&&e<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=e&&e>=this._ne.lng),r&&n}static convert(t){return!t||t instanceof th?t:new th(t)}}const eh=6371008.8;class ih{constructor(t,e){if(isNaN(t)||isNaN(e))throw new Error(`Invalid LngLat object: (${t}, ${e})`);if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new ih(b(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const e=Math.PI/180,i=this.lat*e,r=t.lat*e,n=Math.sin(i)*Math.sin(r)+Math.cos(i)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return eh*Math.acos(Math.min(n,1))}toBounds(t=0){const e=360*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new th(new ih(this.lng-i,this.lat-e),new ih(this.lng+i,this.lat+e))}static convert(t){if(t instanceof ih)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new ih(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new ih(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const rh=2*Math.PI*eh;function nh(t){return rh*Math.cos(t*Math.PI/180)}function oh(t){return(180+t)/360}function ah(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function sh(t,e){return t/nh(e)}function lh(t){return 360*t-180}function hh(t){const e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function ch(t,e){return t*nh(hh(e))}const uh=85.051129;function dh(t){return 1/Math.cos(t*Math.PI/180)}class ph{constructor(t,e,i=0){this.x=+t,this.y=+e,this.z=+i}static fromLngLat(t,e=0){const i=ih.convert(t);return new ph(oh(i.lng),ah(i.lat),sh(e,i.lat))}toLngLat(){return new ih(lh(this.x),hh(this.y))}toAltitude(){return ch(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/rh*dh(hh(this.y))}}function fh(t,e,i,r,n,o){const a=i-n,s=r-o;return Math.abs((r-e)*a-(i-t)*s)/Math.hypot(a,s)}function mh(t,e,i,r,o,a,s,l,h){const c=(e+r)/2,u=(i+o)/2,d=new n(c,u);l(d),fh(d.x,d.y,a.x,a.y,s.x,s.y)>=h?(mh(t,e,i,c,u,a,d,l,h),mh(t,c,u,r,o,d,s,l,h)):t.push(s)}function vh(t,e,i){let r=t[0],n=r.x,o=r.y;e(r);const a=[r];for(let s=1;st.x+1||rt.y+1)&&V("Geometry exceeds allowed extent, reduce your vector tile buffer size"),t}function zh(t,e,i){const r=t.loadGeometry(),n=t.extent,o=Ql/n;if(e&&i&&i.projection.isReprojectedInTileSpace){const o=1<{const i=lh((e.x+t.x/n)/o),r=hh((e.y+t.y/n)/o),c=h.project(i,r);t.x=(c.x*a-s)*n,t.y=(c.y*a-l)*n};for(let e=0;e=n||i.y<0||i.y>=n||(c(i),t.push(i));r[e]=t}}for(const t of r)for(const e of t)wh(e,o);return r}function Mh(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?zh(t):[]}}function Th(t,e,i,r,n){t.emplaceBack(2*e+(r+1)/2,2*i+(n+1)/2)}function Eh(t,e,i){const r=16384;t.emplaceBack(e.x,e.y,e.z,i[0]*r,i[1]*r,i[2]*r)}class Ah{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.projection=t.projection,this.layoutVertexArray=new zs,this.indexArray=new Ns,this.segments=new Jl,this.programConfigurations=new Vl(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i,r){const n=this.layers[0],o=[];let a=null;"circle"===n.type&&(a=n.layout.get("circle-sort-key"));for(const{feature:e,id:n,index:s,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,h=Mh(e,t);if(!this.layers[0]._featureFilter.filter(new Qa(this.zoom),h,i))continue;const c=a?a.evaluate(h,{},i):void 0,u={id:n,properties:e.properties,type:e.type,sourceLayerIndex:l,index:s,geometry:t?h.geometry:zh(e,i,r),patterns:{},sortKey:c};o.push(u)}a&&o.sort(((t,e)=>t.sortKey-e.sortKey));let s=null;"globe"===r.projection.name&&(this.globeExtVertexArray=new cl,s=r.projection);for(const r of o){const{geometry:n,index:o,sourceLayerIndex:a}=r,l=t[o].feature;this.addFeature(r,n,o,e.availableImages,i,s),e.featureIndex.insert(l,n,o,a,this.index)}}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Yl.members),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,Kl.members))),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(t,e,i,r,n,o){for(const i of e)for(const e of i){const i=e.x,r=e.y;if(i<0||i>=Ql||r<0||r>=Ql)continue;if(o){const t=o.projectTilePoint(i,r,n),e=o.upVector(n,i,r),a=this.globeExtVertexArray;Eh(a,t,e),Eh(a,t,e),Eh(a,t,e),Eh(a,t,e)}const a=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),s=a.vertexLength;Th(this.layoutVertexArray,i,r,-1,-1),Th(this.layoutVertexArray,i,r,1,-1),Th(this.layoutVertexArray,i,r,1,1),Th(this.layoutVertexArray,i,r,-1,1),this.indexArray.emplaceBack(s,s+1,s+2),this.indexArray.emplaceBack(s,s+2,s+3),a.vertexLength+=4,a.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,{},r,n)}}function Ch(t,e){for(let i=0;i=3)for(let e=0;e1){if(Lh(t,e))return!0;for(let r=0;r1?t.distSqr(i):t.distSqr(i.sub(e)._mult(n)._add(e))}function Bh(t,e){let i,r,n,o=!1;for(let a=0;ae.y!=n.y>e.y&&e.x<(n.x-r.x)*(e.y-r.y)/(n.y-r.y)+r.x&&(o=!o)}return o}function Fh(t,e){let i=!1;for(let r=0,n=t.length-1;re.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}function Nh(t,e,i,r,o){for(const n of t)if(e<=n.x&&i<=n.y&&r>=n.x&&o>=n.y)return!0;const a=[new n(e,i),new n(e,o),new n(r,o),new n(r,i)];if(t.length>2)for(const e of a)if(Fh(t,e))return!0;for(let e=0;en.x&&e.x>n.x||t.yn.y&&e.y>n.y)return!1;const o=$(t,e,i[0]);return o!==$(t,e,i[1])||o!==$(t,e,i[2])||o!==$(t,e,i[3])}function jh(t,e,i){const r=e.paint.get(t).value;return"constant"===r.kind?r.value:i.programConfigurations.get(e.id).getMaxValue(t)}function Vh(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function $h(t,e,i,r,o){if(!e[0]&&!e[1])return t;const a=n.convert(e)._mult(o);"viewport"===i&&a._rotate(-r);const s=[];for(let e=0;e0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Dc(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Rc(t,e,i){var r=e[0],n=e[1],o=e[2],a=i[0],s=i[1],l=i[2];return t[0]=n*l-o*s,t[1]=o*a-r*l,t[2]=r*s-n*a,t}function Oc(t,e,i){var r=e[0],n=e[1],o=e[2],a=i[3]*r+i[7]*n+i[11]*o+i[15];return a=a||1,t[0]=(i[0]*r+i[4]*n+i[8]*o+i[12])/a,t[1]=(i[1]*r+i[5]*n+i[9]*o+i[13])/a,t[2]=(i[2]*r+i[6]*n+i[10]*o+i[14])/a,t}function Bc(t,e,i){var r=e[0],n=e[1],o=e[2];return t[0]=r*i[0]+n*i[3]+o*i[6],t[1]=r*i[1]+n*i[4]+o*i[7],t[2]=r*i[2]+n*i[5]+o*i[8],t}function Fc(t,e,i){var r=i[0],n=i[1],o=i[2],a=i[3],s=e[0],l=e[1],h=e[2],c=n*h-o*l,u=o*s-r*h,d=r*l-n*s,p=n*d-o*u,f=o*c-r*d,m=r*u-n*c,v=2*a;return c*=v,u*=v,d*=v,p*=2,f*=2,m*=2,t[0]=s+c+p,t[1]=l+u+f,t[2]=h+d+m,t}function Nc(t,e){var i=t[0],r=t[1],n=t[2],o=e[0],a=e[1],s=e[2],l=Math.sqrt(i*i+r*r+n*n)*Math.sqrt(o*o+a*a+s*s),h=l&&Dc(t,e)/l;return Math.acos(Math.min(Math.max(h,-1),1))}function Uc(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function jc(t,e){var i=t[0],r=t[1],n=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(i-o)<=Hh*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(r-a)<=Hh*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-s)<=Hh*Math.max(1,Math.abs(n),Math.abs(s))}var Vc=Mc,$c=Tc,Gc=Ec,qc=bc;function Zc(){var t=new Wh(4);return Wh!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Hc(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t[3]=e[3]*i[3],t}function Wc(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t}function Xc(t){var e=t[0],i=t[1],r=t[2],n=t[3];return Math.hypot(e,i,r,n)}function Yc(t,e){var i=e[0],r=e[1],n=e[2],o=e[3],a=i*i+r*r+n*n+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=i*a,t[1]=r*a,t[2]=n*a,t[3]=o*a,t}function Kc(t,e,i){var r=e[0],n=e[1],o=e[2],a=e[3];return t[0]=i[0]*r+i[4]*n+i[8]*o+i[12]*a,t[1]=i[1]*r+i[5]*n+i[9]*o+i[13]*a,t[2]=i[2]*r+i[6]*n+i[10]*o+i[14]*a,t[3]=i[3]*r+i[7]*n+i[11]*o+i[15]*a,t}function Jc(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}yc();var Qc=Hc;function tu(){var t=new Wh(4);return Wh!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function eu(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function iu(t,e,i){i*=.5;var r=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=r*l+a*s,t[1]=n*l+o*s,t[2]=o*l-n*s,t[3]=a*l-r*s,t}function ru(t,e,i){i*=.5;var r=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=r*l-o*s,t[1]=n*l+a*s,t[2]=o*l+r*s,t[3]=a*l-n*s,t}function nu(t,e,i){i*=.5;var r=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(i),l=Math.cos(i);return t[0]=r*l+n*s,t[1]=n*l-r*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t}function ou(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}Zc();var au=Xc,su=Yc,lu=Jc;yc(),wc(1,0,0),wc(0,1,0),tu(),tu(),Xh();class hu{constructor(t,e){this.pos=t,this.dir=e}intersectsPlane(t,e,i){const r=Dc(e,this.dir);if(Math.abs(r)<1e-6)return!1;const n=((t[0]-this.pos[0])*e[0]+(t[1]-this.pos[1])*e[1]+(t[2]-this.pos[2])*e[2])/r;return i[0]=this.pos[0]+this.dir[0]*n,i[1]=this.pos[1]+this.dir[1]*n,i[2]=this.pos[2]+this.dir[2]*n,!0}closestPointOnSphere(t,e,i){if(jc(this.pos,t)||0===e)return i[0]=i[1]=i[2]=0,!1;const[r,n,o]=this.dir,a=this.pos[0]-t[0],s=this.pos[1]-t[1],l=this.pos[2]-t[2],h=r*r+n*n+o*o,c=2*(a*r+s*n+l*o),u=c*c-4*h*(a*a+s*s+l*l-e*e);if(u<0){const t=Math.max(-c/2,0),h=a+r*t,u=s+n*t,d=l+o*t,p=Math.hypot(h,u,d);return i[0]=h*e/p,i[1]=u*e/p,i[2]=d*e/p,!1}{const t=(-c-Math.sqrt(u))/(2*h);if(t<0){const t=Math.hypot(a,s,l);return i[0]=a*e/t,i[1]=s*e/t,i[2]=l*e/t,!1}return i[0]=a+r*t,i[1]=s+n*t,i[2]=l+o*t,!0}}}class cu{constructor(t,e,i,r,n){this.TL=t,this.TR=e,this.BR=i,this.BL=r,this.horizon=n}static fromInvProjectionMatrix(t,e,i){const r=[-1,1,1],n=[1,1,1],o=[1,-1,1],a=[-1,-1,1],s=Oc(r,r,t),l=Oc(n,n,t),h=Oc(o,o,t),c=Oc(a,a,t);return new cu(s,l,h,c,e/i)}}class uu{constructor(t,e){this.points=t,this.planes=e}static fromInvProjectionMatrix(t,e,i,r){const n=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],o=Math.pow(2,i),a=n.map((i=>{const n=Kc([],i,t),a=1/n[3]/e*o;return Qc(n,n,[a,a,r?1/n[3]:a,a])})),s=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((t=>{const e=Lc([],Rc([],Vc([],a[t[0]],a[t[1]]),Vc([],a[t[2]],a[t[1]]))),i=-Dc(e,a[t[1]]);return e.concat(i)}));return new uu(a,s)}}class du{constructor(t,e){this.min=t,this.max=e,this.center=Sc([],zc([],this.min,this.max),.5)}quadrant(t){const e=[t%2==0,t<2],i=xc(this.min),r=xc(this.max);for(let t=0;t=0;if(0===o)return 0;o!==e.length&&(i=!1)}if(i)return 2;for(let e=0;e<3;e++){let i=Number.MAX_VALUE,r=-Number.MAX_VALUE;for(let n=0;nthis.max[e]-this.min[e])return 0}return 1}}class pu extends Xl{constructor(t){super(t,Zh)}createBucket(t){return new Ah(t)}queryRadius(t){const e=t;return jh("circle-radius",this,e)+jh("circle-stroke-width",this,e)+Vh(this.paint.get("circle-translate"))}queryIntersectsFeature(t,e,i,r,n,o,a,s){const l=Gh(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),h=this.paint.get("circle-radius").evaluate(e,i)+this.paint.get("circle-stroke-width").evaluate(e,i);return fu(t,r,o,a,s,"map"===this.paint.get("circle-pitch-alignment"),"map"===this.paint.get("circle-pitch-scale"),l,h)}getProgramIds(){return["circle"]}getProgramConfiguration(t){return new jl(this,t)}}function fu(t,e,i,r,n,o,a,s,l){if(o&&t.queryGeometry.isAboveHorizon)return!1;o&&(l*=t.pixelToTileUnitsFactor);const h=t.tileID.canonical,c=i.projection.upVectorScale(h,i.center.lat,i.worldSize).metersToTile;for(const u of e)for(const e of u){const u=e.add(s),d=n&&i.elevation?i.elevation.exaggeration()*n.getElevationAt(u.x,u.y,!0):0,p=i.projection.projectTilePoint(u.x,u.y,h);if(d>0){const t=i.projection.upVector(h,u.x,u.y);p.x+=t[0]*c*d,p.y+=t[1]*c*d,p.z+=t[2]*c*d}const f=o?u:mu(p.x,p.y,p.z,r),m=o?t.tilespaceRays.map((t=>gu(t,d))):t.queryGeometry.screenGeometry,v=Kc([],[p.x,p.y,p.z,1],r);if(!a&&o?l*=v[3]/i.cameraToCenterDistance:a&&!o&&(l*=i.cameraToCenterDistance/v[3]),o){const t=hh((e.y/Ql+h.y)/(1<t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");const a=t.data,s=e.data;for(let l=0;l{e[t.evaluationKey]=o;const a=t.expression.evaluate(e);n.data[i+r+0]=Math.floor(255*a.r/a.a),n.data[i+r+1]=Math.floor(255*a.g/a.a),n.data[i+r+2]=Math.floor(255*a.b/a.a),n.data[i+r+3]=Math.floor(255*a.a)};if(t.clips)for(let e=0,n=0;e80*i){r=o=t[0],n=a=t[1];for(var f=i;fo&&(o=s),l>a&&(a=l);h=0!==(h=Math.max(o-r,a-n))?1/h:0}return Nu(d,p,i,r,n,h),p}function Bu(t,e,i,r,n){var o,a;if(n===pd(t,e,i,r)>0)for(o=e;o=e;o-=r)a=cd(o,t[o],t[o+1],a);return a&&id(a,a.next)&&(ud(a),a=a.next),a}function Fu(t,e){if(!t)return t;e||(e=t);var i,r=t;do{if(i=!1,r.steiner||!id(r,r.next)&&0!==ed(r.prev,r,r.next))r=r.next;else{if(ud(r),(r=e=r.prev)===r.next)break;i=!0}}while(i||r!==e);return e}function Nu(t,e,i,r,n,o,a){if(t){!a&&o&&Xu(t,r,n,o);for(var s,l,h=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?ju(t,r,n,o):Uu(t))e.push(s.i/i),e.push(t.i/i),e.push(l.i/i),ud(t),t=l.next,h=l.next;else if((t=l)===h){a?1===a?Nu(t=Vu(Fu(t),e,i),e,i,r,n,o,2):2===a&&$u(t,e,i,r,n,o):Nu(Fu(t),e,i,r,n,o,1);break}}}function Uu(t){var e=t.prev,i=t,r=t.next;if(ed(e,i,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(Qu(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&ed(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function ju(t,e,i,r){var n=t.prev,o=t,a=t.next;if(ed(n,o,a)>=0)return!1;for(var s=n.xo.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,u=Ku(s,l,e,i,r),d=Ku(h,c,e,i,r),p=t.prevZ,f=t.nextZ;p&&p.z>=u&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&Qu(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ed(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==t.prev&&f!==t.next&&Qu(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&ed(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Qu(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ed(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&Qu(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&ed(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Vu(t,e,i){var r=t;do{var n=r.prev,o=r.next.next;!id(n,o)&&rd(n,r,r.next,o)&&sd(n,o)&&sd(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),ud(r),ud(r.next),r=t=o),r=r.next}while(r!==t);return Fu(r)}function $u(t,e,i,r,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&td(a,s)){var l=hd(a,s);return a=Fu(a,a.next),l=Fu(l,l.next),Nu(a,e,i,r,n,o),void Nu(l,e,i,r,n,o)}s=s.next}a=a.next}while(a!==t)}function Gu(t,e,i,r){var n,o,a,s=[];for(n=0,o=e.length;n=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a){if(a=s,s===n){if(o===r.y)return r;if(o===r.next.y)return r.next}i=r.x=r.x&&r.x>=c&&n!==r.x&&Qu(oi.x||r.x===i.x&&Wu(i,r)))&&(i=r,d=l)),r=r.next}while(r!==h);return i}function Wu(t,e){return ed(t.prev,t,e.prev)<0&&ed(e.next,t,t.next)<0}function Xu(t,e,i,r){var n=t;do{null===n.z&&(n.z=Ku(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,Yu(n)}function Yu(t){var e,i,r,n,o,a,s,l,h=1;do{for(i=t,t=null,o=null,a=0;i;){for(a++,r=i,s=0,e=0;e0||l>0&&r;)0!==s&&(0===l||!r||i.z<=r.z)?(n=i,i=i.nextZ,s--):(n=r,r=r.nextZ,l--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;i=r}o.nextZ=null,h*=2}while(a>1);return t}function Ku(t,e,i,r,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ju(t){var e=t,i=t;do{(e.x=0&&(t-a)*(r-s)-(i-a)*(e-s)>=0&&(i-a)*(o-s)-(n-a)*(r-s)>=0}function td(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!ad(t,e)&&(sd(t,e)&&sd(e,t)&&ld(t,e)&&(ed(t.prev,t,e.prev)||ed(t,e.prev,e))||id(t,e)&&ed(t.prev,t,t.next)>0&&ed(e.prev,e,e.next)>0)}function ed(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function id(t,e){return t.x===e.x&&t.y===e.y}function rd(t,e,i,r){var n=od(ed(t,e,i)),o=od(ed(t,e,r)),a=od(ed(i,r,t)),s=od(ed(i,r,e));return n!==o&&a!==s||!(0!==n||!nd(t,i,e))||!(0!==o||!nd(t,r,e))||!(0!==a||!nd(i,t,r))||!(0!==s||!nd(i,e,r))}function nd(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function od(t){return t>0?1:t<0?-1:0}function ad(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&rd(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function sd(t,e){return ed(t.prev,t,t.next)<0?ed(t,e,t.next)>=0&&ed(t,t.prev,e)>=0:ed(t,e,t.prev)<0||ed(t,t.next,e)<0}function ld(t,e){var i=t,r=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{i.y>o!=i.next.y>o&&i.next.y!==i.y&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==t);return r}function hd(t,e){var i=new dd(t.i,t.x,t.y),r=new dd(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,r.next=i,i.prev=r,o.next=r,r.prev=o,r}function cd(t,e,i,r){var n=new dd(t,e,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function ud(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function dd(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function pd(t,e,i,r){for(var n=0,o=e,a=i-r;oi;){if(r-i>600){var o=r-i+1,a=e-i+1,s=Math.log(o),l=.5*Math.exp(2*s/3),h=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);md(t,e,Math.max(i,Math.floor(e-a*l/o+h)),Math.min(r,Math.floor(e+(o-a)*l/o+h)),n)}var c=t[e],u=i,d=r;for(vd(t,i,e),n(t[r],c)>0&&vd(t,i,r);u0;)d--}0===n(t[i],c)?vd(t,i,d):vd(t,++d,r),d<=e&&(i=d+1),e<=d&&(r=d-1)}}function vd(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function _d(t,e){return te?1:0}function gd(t,e){const i=t.length;if(i<=1)return[t];const r=[];let n,o;for(let e=0;e1)for(let t=0;t0&&(r+=t[n-1].length,i.holes.push(r))}return i},Du.default=Ru;const wd=500;class zd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zs,this.indexArray=new Ns,this.indexArray2=new Zs,this.programConfigurations=new Vl(t.layers,t.zoom),this.segments=new Jl,this.segments2=new Jl,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.projection=t.projection}populate(t,e,i,r){this.hasPattern=xd("fill",this.layers,e);const n=this.layers[0].layout.get("fill-sort-key"),o=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:h}of t){const t=this.layers[0]._featureFilter.needGeometry,c=Mh(a,t);if(!this.layers[0]._featureFilter.filter(new Qa(this.zoom),c,i))continue;const u=n?n.evaluate(c,{},i,e.availableImages):void 0,d={id:s,properties:a.properties,type:a.type,sourceLayerIndex:h,index:l,geometry:t?c.geometry:zh(a,i,r),patterns:{},sortKey:u};o.push(d)}n&&o.sort(((t,e)=>t.sortKey-e.sortKey));for(const r of o){const{geometry:n,index:o,sourceLayerIndex:a}=r;if(this.hasPattern){const t=bd("fill",this.layers,r,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(r,n,o,i,{},e.availableImages);const s=t[o].feature;e.featureIndex.insert(s,n,o,a,this.index)}}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i,r)}addFeatures(t,e,i,r,n){for(const t of this.patternFeatures)this.addFeature(t,t.geometry,t.index,e,i,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Pu),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,e,i,r,n,o=[]){for(const t of gd(e,wd)){let e=0;for(const i of t)e+=i.length;const i=this.segments.prepareSegment(e,this.layoutVertexArray,this.indexArray),r=i.vertexLength,n=[],o=[];for(const e of t){if(0===e.length)continue;e!==t[0]&&o.push(n.length/2);const i=this.segments2.prepareSegment(e.length,this.layoutVertexArray,this.indexArray2),r=i.vertexLength;this.layoutVertexArray.emplaceBack(e[0].x,e[0].y),this.indexArray2.emplaceBack(r+e.length-1,r),n.push(e[0].x),n.push(e[0].y);for(let t=1;t>3}if(o--,1===r||2===r)a+=t.readSVarint(),s+=t.readSVarint(),1===r&&(e&&l.push(e),e=[]),e.push(new n(a,s));else{if(7!==r)throw new Error("unknown command "+r);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Dd.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,i=1,r=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,h=-1/0;t.pos>3}if(r--,1===i||2===i)(n+=t.readSVarint())s&&(s=n),(o+=t.readSVarint())h&&(h=o);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,s,h]},Dd.prototype.toGeoJSON=function(t,e,i){var r,n,o=this.extent*Math.pow(2,i),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),h=Dd.types[this.type];function c(t){for(var e=0;e>3;e=1===r?t.readString():2===r?t.readFloat():3===r?t.readDouble():4===r?t.readVarint64():5===r?t.readVarint():6===r?t.readSVarint():7===r?t.readBoolean():null}return e}function $d(t,e){this.layers=t.readFields(Gd,{},e)}function Gd(t,e,i){if(3===t){var r=new Nd(i,i.readVarint()+i.pos);r.length&&(e[r.name]=r)}}Ud.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Ld(this._pbf,e,this.extent,this._keys,this._values)};var qd={VectorTile:$d,VectorTileFeature:Ld,VectorTileLayer:Nd};function Zd(t,e,i,r){const o=(t,e,i,r,o,a)=>{t.push(new n(a,i+(a-e)/(r-e)*(o-i)))},a=(t,e,i,r,o,a)=>{t.push(new n(e+(a-i)/(o-i)*(r-e),a))},s=[],l=0===r?o:a;for(const n of t){const t=[];for(const o of n){if(o.length<=2)continue;const n=[];for(let t=0;te&&l(n,a,s,h,c,e):u>i?d=e&&l(n,a,s,h,c,e),d>i&&u<=i&&l(n,a,s,h,c,i)}let a=o[o.length-1];const s=0===r?a.x:a.y;s>=e&&s<=i&&n.push(a),n.length&&(a=n[n.length-1],n[0].x===a.x&&n[0].y===a.y||n.push(n[0]),t.push(n))}t.length&&s.push(t)}return s}function Hd(t,e,i,r,o=0,a){const s=[];if(!t.length||!i||!r)return s;const l=(t,e)=>{for(const i of t)s.push({polygon:i,bounds:e})},h=Math.ceil(Math.log2(i)),c=Math.ceil(Math.log2(r)),u=h-c,d=[];for(let t=0;t0?0:1);for(let t=0;te+1?f.push({polygons:p,bounds:a,depth:e+1}):l(p,a)}if(m.length){const t=0===i?u:r.x,o=1===i?u:r.y,a=[new n(t,o),s];d.length>e+1?f.push({polygons:m,bounds:a,depth:e+1}):l(m,a)}}return s}const Wd=qd.VectorTileFeature.types,Xd=500,Yd=Math.pow(2,13),Kd=7,Jd=450;function Qd(t,e,i,r,n,o,a,s){t.emplaceBack((e<<1)+a,(i<<1)+o,(Math.floor(r*Yd)<<1)+n,Math.round(s))}function tp(t,e,i){const r=16384;t.emplaceBack(e.x,e.y,e.z,i[0]*r,i[1]*r,i[2]*r)}class ep{constructor(){this.acc=new n(0,0),this.polyCount=[]}startRing(t){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new n(t.x,t.y),this.max=new n(t.x,t.y))}append(t,e){this.currentPolyCount.edges++,this.acc._add(t);const i=this.min,r=this.max;t.xr.x&&(r.x=t.x),t.yr.y&&(r.y=t.y),((0===t.x||t.x===Ql)&&t.x===e.x)!=((0===t.y||t.y===Ql)&&t.y===e.y)&&this.processBorderOverlap(t,e),e.x<0!=t.x<0&&this.addBorderIntersection(0,yr(e.y,t.y,(0-e.x)/(t.x-e.x))),e.x>Ql!=t.x>Ql&&this.addBorderIntersection(1,yr(e.y,t.y,(Ql-e.x)/(t.x-e.x))),e.y<0!=t.y<0&&this.addBorderIntersection(2,yr(e.x,t.x,(0-e.y)/(t.y-e.y))),e.y>Ql!=t.y>Ql&&this.addBorderIntersection(3,yr(e.x,t.x,(Ql-e.y)/(t.y-e.y)))}addBorderIntersection(t,e){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const i=this.borders[t];ei[1]&&(i[1]=e)}processBorderOverlap(t,e){if(t.x===e.x){if(t.y===e.y)return;const i=0===t.x?0:1;this.addBorderIntersection(i,e.y),this.addBorderIntersection(i,t.y)}else{const i=0===t.y?2:3;this.addBorderIntersection(i,e.x),this.addBorderIntersection(i,t.x)}}centroid(){const t=this.polyCount.reduce(((t,e)=>t+e.edges),0);return 0!==t?this.acc.div(t)._round():new n(0,0)}span(){return new n(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce(((t,e)=>t+ +(e[0]!==Number.MAX_VALUE)),0)}}class ip{constructor(t){this.zoom=t.zoom,this.canonical=t.canonical,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.hasPattern=!1,this.projection=t.projection,this.layoutVertexArray=new Ts,this.centroidVertexArray=new ll,this.indexArray=new Ns,this.programConfigurations=new Vl(t.layers,t.zoom),this.segments=new Jl,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.enableTerrain=t.enableTerrain}populate(t,e,i,r){this.features=[],this.hasPattern=xd("fill-extrusion",this.layers,e),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=op(i);for(const{feature:n,id:o,index:a,sourceLayerIndex:s}of t){const t=this.layers[0]._featureFilter.needGeometry,l=Mh(n,t);if(!this.layers[0]._featureFilter.filter(new Qa(this.zoom),l,i))continue;const h={id:o,sourceLayerIndex:s,index:a,geometry:t?l.geometry:zh(n,i,r),properties:n.properties,type:n.type,patterns:{}},c=this.layoutVertexArray.length;this.hasPattern?this.features.push(bd("fill-extrusion",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,a,i,{},e.availableImages,r),e.featureIndex.insert(n,h.geometry,a,s,this.index,c)}this.sortBorders()}addFeatures(t,e,i,r,n){for(const t of this.features){const{geometry:o}=t;this.addFeature(t,o,t.index,e,i,r,n)}this.sortBorders()}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Id),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=t.createVertexBuffer(this.layoutVertexExtArray,Sd.members,!0))),this.programConfigurations.upload(t),this.uploaded=!0}uploadCentroid(t){0!==this.centroidVertexArray.length&&(this.centroidVertexBuffer?this.needsCentroidUpdate&&this.centroidVertexBuffer.updateData(this.centroidVertexArray):this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Cd.members,!0),this.needsCentroidUpdate=!1)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.centroidVertexBuffer&&this.centroidVertexBuffer.destroy(),this.layoutVertexExtBuffer&&this.layoutVertexExtBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,i,r,o,a,s){const l=[new n(0,0),new n(Ql,Ql)],h=s.projection,c="globe"===h.name,u=this.enableTerrain&&!c?new ep:null;c&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new Ys);const d=gd(e,Xd);for(let t=d.length-1;t>=0;t--){const e=d[t];(0===e.length||np(e[0]))&&d.splice(t,1)}let p;if(c)p=sp(d,l,r);else{p=[];for(const t of d)p.push({polygon:t,bounds:l})}for(const e of p){const i=e.polygon;let n=0,o=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let t=0;t=1){const n=a[t-1];if(!rp(i,n,e.bounds)){u&&u.append(i,n),o.vertexLength+4>Jl.MAX_VERTEX_ARRAY_LENGTH&&(o=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const t=i.sub(n)._perp(),e=t.x/(Math.abs(t.x)+Math.abs(t.y)),a=t.y>0?1:0,l=n.dist(i);s+l>32768&&(s=0),Qd(this.layoutVertexArray,i.x,i.y,e,a,0,0,s),Qd(this.layoutVertexArray,i.x,i.y,e,a,0,1,s),s+=l,Qd(this.layoutVertexArray,n.x,n.y,e,a,0,0,s),Qd(this.layoutVertexArray,n.x,n.y,e,a,0,1,s);const d=o.vertexLength;if(this.indexArray.emplaceBack(d,d+2,d+1),this.indexArray.emplaceBack(d+1,d+2,d+3),o.vertexLength+=4,o.primitiveLength+=2,c){const t=this.layoutVertexExtArray,e=h.projectTilePoint(i.x,i.y,r),o=h.projectTilePoint(n.x,n.y,r),a=h.upVector(r,i.x,i.y),s=h.upVector(r,n.x,n.y);tp(t,e,a),tp(t,e,a),tp(t,o,s),tp(t,o,s)}}}}}if(o.vertexLength+n>Jl.MAX_VERTEX_ARRAY_LENGTH&&(o=this.segments.prepareSegment(n,this.layoutVertexArray,this.indexArray)),"Polygon"!==Wd[t.type])continue;const a=[],s=[],l=o.vertexLength;for(let t=0;t0){if(u.borders){u.vertexArrayOffset=this.centroidVertexArray.length;const t=u.borders,e=this.featuresOnBorder.push(u)-1;for(let i=0;i<4;i++)t[i][0]!==Number.MAX_VALUE&&this.borders[i].push(e)}this.encodeCentroid(u.borders?void 0:u.centroid(),u)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,o,a,r)}sortBorders(){for(let t=0;t<4;t++)this.borders[t].sort(((e,i)=>this.featuresOnBorder[e].borders[t][0]-this.featuresOnBorder[i].borders[t][0]))}encodeCentroid(t,e,i=!0){let r,n;if(t)if(0!==t.y){const i=e.span()._mult(this.tileToMeter);r=(Math.max(t.x,1)<<3)+Math.min(7,Math.round(i.x/10)),n=(Math.max(t.y,1)<<3)+Math.min(7,Math.round(i.y/10))}else r=Math.ceil((t.x+Jd)*Kd),n=0;else r=0,n=+i;let o=i?this.centroidVertexArray.length:e.vertexArrayOffset;for(const t of e.polyCount){i&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*t.edges+t.top);for(let e=0;e<2*t.edges;e++)this.centroidVertexArray.emplace(o++,0,n),this.centroidVertexArray.emplace(o++,r,n);for(let e=0;ei[1].x)||t.y===e.y&&(t.yi[1].y)}function np(t){return t.every((t=>t.x<=0))||t.every((t=>t.x>=Ql))||t.every((t=>t.y<=0))||t.every((t=>t.y>=Ql))}function op(t){const e=40075017,i=t.y/(1<{if(0===t)return.5*(e+r);{const t=hh((i.y+e/Ql)/n);return(ah(.5*(hh((i.y+r/Ql)/n)+t))*n-i.y)*Ql}};return Hd(t,e,Math.ceil((a-o)/r),Math.ceil((s-l)/r),1,h)}ba(ip,"FillExtrusionBucket",{omit:["layers","features"]}),ba(ep,"PartMetadata");var lp={paint:new ps({"fill-extrusion-opacity":new ls(De["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new hs(De["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ls(De["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ls(De["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new cs(De["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new hs(De["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new hs(De["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ls(De["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function hp(t,e,i){var r=cp(256*t,256*(e=Math.pow(2,i)-e-1),i),n=cp(256*(t+1),256*(e+1),i);return r[0]+","+r[1]+","+n[0]+","+n[1]}function cp(t,e,i){var r=2*Math.PI*6378137/256/Math.pow(2,i);return[t*r-2*Math.PI*6378137/2,e*r-2*Math.PI*6378137/2]}class up{constructor(t,e,i){this.z=t,this.x=e,this.y=i,this.key=fp(0,t,t,e,i)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e){const i=hp(this.x,this.y,this.z),r=mp(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",r).replace("{bbox-epsg-3857}",i)}toString(){return`${this.z}/${this.x}/${this.y}`}}class dp{constructor(t,e){this.wrap=t,this.canonical=e,this.key=fp(t,e.z,e.z,e.x,e.y)}}class pp{constructor(t,e,i,r,n){this.overscaledZ=t,this.wrap=e,this.canonical=new up(i,+r,+n),this.key=0===e&&t===i?this.canonical.key:fp(e,t,i,r,n)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){const e=this.canonical.z-t;return t>this.canonical.z?new pp(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new pp(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)}calculateScaledKey(t,e=!0){if(this.overscaledZ===t&&e)return this.key;if(t>this.canonical.z)return fp(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y);{const i=this.canonical.z-t;return fp(this.wrap*+e,t,t,this.canonical.x>>i,this.canonical.y>>i)}}isChildOf(t){if(t.wrap!==this.wrap)return!1;const e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e}children(t){if(this.overscaledZ>=t)return[new pp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const e=this.canonical.z+1,i=2*this.canonical.x,r=2*this.canonical.y;return[new pp(e,this.wrap,e,i,r),new pp(e,this.wrap,e,i+1,r),new pp(e,this.wrap,e,i,r+1),new pp(e,this.wrap,e,i+1,r+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y0;o--)r=1<t.polygon)).flat());const _=xp(a,r,d,u,c,s,f?l:null,p,m,a.center.lat,t.tileID.canonical),g=_[0],y=_[1],x=t.queryGeometry;return yp(g,y,x.isPointQuery()?x.screenBounds:x.screenGeometry)}}function _p(t,e){return t.x*e.x+t.y*e.y}function gp(t,e){if(1===t.length){let i=0;const r=e[i++];let n;for(;!n||r.equals(n);)if(n=e[i++],!n)return 1/0;for(;i{t[0]=e,t[1]=i,t[2]=r,t[3]=1},_=ap();i>0&&(i+=_),r+=_;for(const _ of e){const e=[],g=[];for(const u of _){const d=u.x+n.x,_=u.y+n.y,y=t.projection.projectTilePoint(d,_,c),x=t.projection.upVector(c,u.x,u.y);let b=i,w=r;if(a){const t=Tp(d,_,i,r,a,s,l,h);b+=t.base,w+=t.top}0!==i?v(f,y.x+x[0]*p*b,y.y+x[1]*p*b,y.z+x[2]*p*b):v(f,y.x,y.y,y.z),v(m,y.x+x[0]*p*w,y.y+x[1]*p*w,y.z+x[2]*p*w),Oc(f,f,o),Oc(m,m,o),e.push(Mp(f)),g.push(Mp(m))}u.push(e),d.push(g)}return[u,d]}function wp(t,e,i,r,o){const a=[],s=[],l=o[8]*e,h=o[9]*e,c=o[10]*e,u=o[11]*e,d=o[8]*i,p=o[9]*i,f=o[10]*i,m=o[11]*i;for(const e of t){const t=[],i=[];for(const a of e){const e=a.x+r.x,s=a.y+r.y,v=o[0]*e+o[4]*s+o[12],_=o[1]*e+o[5]*s+o[13],g=o[2]*e+o[6]*s+o[14],y=o[3]*e+o[7]*s+o[15],x=v+l,b=_+h,w=g+c,z=Math.max(y+u,1e-5),M=v+d,T=_+p,E=g+f,A=Math.max(y+m,1e-5),C=new n(x/z,b/z);C.z=w/z,t.push(C);const S=new n(M/A,T/A);S.z=E/A,i.push(S)}a.push(t),s.push(i)}return[a,s]}function zp(t,e,i,r,n,o,a,s,l){const h=[],c=[],u=[0,0,0,1];for(const d of t){const t=[],p=[];for(const h of d){const c=h.x+r.x,d=h.y+r.y,f=Tp(c,d,e,i,o,a,s,l);u[0]=c,u[1]=d,u[2]=f.base,u[3]=1,Kc(u,u,n),u[3]=Math.max(u[3],1e-5);const m=Mp([u[0]/u[3],u[1]/u[3],u[2]/u[3]]);u[0]=c,u[1]=d,u[2]=f.top,u[3]=1,Kc(u,u,n),u[3]=Math.max(u[3],1e-5);const v=Mp([u[0]/u[3],u[1]/u[3],u[2]/u[3]]);t.push(m),p.push(v)}h.push(t),c.push(p)}return[h,c]}function Mp(t){const e=new n(t[0],t[1]);return e.z=t[2],e}function Tp(t,e,i,r,n,o,a,s){const l=a*n.getElevationAt(t,e,!0,!0),h=0!==o[0],c=h?0===o[1]?a*Ep(o[0]):a*Ap(n,o,s):l;return{base:l+(0===i)?-1:i,top:h?Math.max(c+r,l+i+2):l+r}}function Ep(t){return t/Kd-Jd}function Ap(t,e,i){const r=Math.floor(e[0]/8),n=Math.floor(e[1]/8),o=10*(e[0]-8*r),a=10*(e[1]-8*n),s=t.getElevationAt(r,n,!0,!0),l=t.getMeterToDEM(i),h=Math.floor(.5*(o*l-1)),c=Math.floor(.5*(a*l-1)),u=t.tileCoordToPixel(r,n),d=2*h+1,p=2*c+1,f=Cp(t,u.x-h,u.y-c,d,p),m=Math.abs(f[0]-f[1])+Math.abs(f[2]-f[3]),v=Math.abs(f[0]-f[2])+Math.abs(f[1]-f[3]),_=Math.min(.25,.5*l*m/d),g=Math.min(.25,.5*l*v/p);return s+Math.max(_*o,g*a)}function Cp(t,e,i,r,n){return[t.getElevationAtPixel(e,i,!0),t.getElevationAtPixel(e+n,i,!0),t.getElevationAtPixel(e,i+n,!0),t.getElevationAtPixel(e+r,i+n,!0)]}const Sp=xs([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"},{name:"a_linesofar",components:1,type:"Float32"}],4),{members:Ip,size:Pp,alignment:kp}=Sp,Lp=xs([{name:"a_packed",components:4,type:"Float32"}]),{members:Dp,size:Rp,alignment:Op}=Lp,Bp=qd.VectorTileFeature.types,Fp=63,Np=Math.cos(Math.PI/180*37.5),Up=15,jp=20;class Vp{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.projection=t.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((t=>{this.gradients[t.id]={}})),this.layoutVertexArray=new Es,this.layoutVertexArray2=new As,this.indexArray=new Ns,this.programConfigurations=new Vl(t.layers,t.zoom),this.segments=new Jl,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id))}populate(t,e,i,r){this.hasPattern=xd("line",this.layers,e);const n=this.layers[0].layout.get("line-sort-key"),o=[];for(const{feature:e,id:a,index:s,sourceLayerIndex:l}of t){const t=this.layers[0]._featureFilter.needGeometry,h=Mh(e,t);if(!this.layers[0]._featureFilter.filter(new Qa(this.zoom),h,i))continue;const c=n?n.evaluate(h,{},i):void 0,u={id:a,properties:e.properties,type:e.type,sourceLayerIndex:l,index:s,geometry:t?h.geometry:zh(e,i,r),patterns:{},sortKey:c};o.push(u)}n&&o.sort(((t,e)=>t.sortKey-e.sortKey));const{lineAtlas:a,featureIndex:s}=e,l=this.addConstantDashes(a);for(const r of o){const{geometry:n,index:o,sourceLayerIndex:h}=r;if(l&&this.addFeatureDashes(r,a),this.hasPattern){const t=bd("line",this.layers,r,this.zoom,e);this.patternFeatures.push(t)}else this.addFeature(r,n,o,i,a.positions,e.availableImages);const c=t[o].feature;s.insert(c,n,o,h,this.index)}}addConstantDashes(t){let e=!1;for(const i of this.layers){const r=i.paint.get("line-dasharray").value,n=i.layout.get("line-cap").value;if("constant"!==r.kind||"constant"!==n.kind)e=!0;else{const e=n.value,i=r.value;if(!i)continue;t.addDash(i.from,e),t.addDash(i.to,e),i.other&&t.addDash(i.other,e)}}return e}addFeatureDashes(t,e){const i=this.zoom;for(const r of this.layers){const n=r.paint.get("line-dasharray").value,o=r.layout.get("line-cap").value;if("constant"===n.kind&&"constant"===o.kind)continue;let a,s,l,h,c,u;if("constant"===n.kind){const t=n.value;if(!t)continue;a=t.other||t.to,s=t.to,l=t.from}else a=n.evaluate({zoom:i-1},t),s=n.evaluate({zoom:i},t),l=n.evaluate({zoom:i+1},t);"constant"===o.kind?h=c=u=o.value:(h=o.evaluate({zoom:i-1},t),c=o.evaluate({zoom:i},t),u=o.evaluate({zoom:i+1},t)),e.addDash(a,h),e.addDash(s,c),e.addDash(l,u);const d=e.getKey(a,h),p=e.getKey(s,c),f=e.getKey(l,u);t.patterns[r.id]={min:d,mid:p,max:f}}}update(t,e,i,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,i,r)}addFeatures(t,e,i,r,n){for(const t of this.patternFeatures)this.addFeature(t,t.geometry,t.index,e,i,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,Dp)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ip),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,e,i,r,n,o){const a=this.layers[0].layout,s=a.get("line-join").evaluate(t,{}),l=a.get("line-cap").evaluate(t,{}),h=a.get("line-miter-limit"),c=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const i of e)this.addLine(i,t,s,l,h,c);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,i,n,o,r)}addLine(t,e,i,r,n,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let e=0;e=2&&t[s-1].equals(t[s-2]);)s--;let l=0;for(;l0;if(b&&e>l){const t=u.dist(d);if(t>2*h){const e=u.sub(u.sub(d)._mult(h/t)._round());this.updateDistance(d,e),this.addCurrentVertex(e,f,0,0,c),d=e}}const z=d&&p;let M=z?i:a?"butt":r;if(z&&"round"===M&&(yn&&(M="bevel"),"bevel"===M&&(y>2&&(M="flipbevel"),y100)v=m.mult(-1);else{const t=y*f.add(m).mag()/f.sub(m).mag();v._perp()._mult(t*(w?-1:1))}this.addCurrentVertex(u,v,0,0,c),this.addCurrentVertex(u,v.mult(-1),0,0,c)}else if("bevel"===M||"fakeround"===M){const t=-Math.sqrt(y*y-1),e=w?t:0,i=w?0:t;if(d&&this.addCurrentVertex(u,f,e,i,c),"fakeround"===M){const t=Math.round(180*x/Math.PI/jp);for(let e=1;e2*h){const e=u.add(p.sub(u)._mult(h/t)._round());this.updateDistance(u,e),this.addCurrentVertex(e,m,0,0,c),u=e}}}}addCurrentVertex(t,e,i,r,n,o=!1){const a=e.x+e.y*i,s=e.y-e.x*i,l=-e.x+e.y*r,h=-e.y-e.x*r;this.addHalfVertex(t,a,s,o,!1,i,n),this.addHalfVertex(t,l,h,o,!0,-r,n)}addHalfVertex({x:t,y:e},i,r,n,o,a,s){this.layoutVertexArray.emplaceBack((t<<1)+(n?1:0),(e<<1)+(o?1:0),Math.round(Fp*i)+128,Math.round(Fp*r)+128,1+(0===a?0:a<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const l=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),s.primitiveLength++),o?this.e2=l:this.e1=l}updateScaledDistance(){if(this.lineClips){const t=this.lineClips.end-this.lineClips.start,e=this.totalDistance/t;this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=e*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}}ba(Vp,"LineBucket",{omit:["layers","patternFeatures"]});const $p=new ps({"line-cap":new hs(De.layout_line["line-cap"]),"line-join":new hs(De.layout_line["line-join"]),"line-miter-limit":new ls(De.layout_line["line-miter-limit"]),"line-round-limit":new ls(De.layout_line["line-round-limit"]),"line-sort-key":new hs(De.layout_line["line-sort-key"])});var Gp={paint:new ps({"line-opacity":new hs(De.paint_line["line-opacity"]),"line-color":new hs(De.paint_line["line-color"]),"line-translate":new ls(De.paint_line["line-translate"]),"line-translate-anchor":new ls(De.paint_line["line-translate-anchor"]),"line-width":new hs(De.paint_line["line-width"]),"line-gap-width":new hs(De.paint_line["line-gap-width"]),"line-offset":new hs(De.paint_line["line-offset"]),"line-blur":new hs(De.paint_line["line-blur"]),"line-dasharray":new cs(De.paint_line["line-dasharray"]),"line-pattern":new cs(De.paint_line["line-pattern"]),"line-gradient":new ds(De.paint_line["line-gradient"]),"line-trim-offset":new ls(De.paint_line["line-trim-offset"])}),layout:$p};class qp extends hs{possiblyEvaluate(t,e){return e=new Qa(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,i,r){return e=E({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,i,r)}}const Zp=new qp(Gp.paint.properties["line-width"].specification);Zp.useIntegerZoom=!0;class Hp extends Xl{constructor(t){super(t,Gp),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(t){if("line-gradient"===t){const t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression&&t._styleExpression.expression instanceof gr,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Zp.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Vp(t)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getProgramConfiguration(t){return new jl(this,t)}queryRadius(t){const e=t,i=Wp(jh("line-width",this,e),jh("line-gap-width",this,e)),r=jh("line-offset",this,e);return i/2+Math.abs(r)+Vh(this.paint.get("line-translate"))}queryIntersectsFeature(t,e,i,r,n,o){if(t.queryGeometry.isAboveHorizon)return!1;const a=$h(t.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,t.pixelToTileUnitsFactor),s=t.pixelToTileUnitsFactor/2*Wp(this.paint.get("line-width").evaluate(e,i),this.paint.get("line-gap-width").evaluate(e,i)),l=this.paint.get("line-offset").evaluate(e,i);return l&&(r=Xp(r,l*t.pixelToTileUnitsFactor)),Ph(a,r,s)}isTileClipped(){return!0}}function Wp(t,e){return e>0?e+2*t:t}function Xp(t,e){const i=[],r=new n(0,0);for(let n=0;n{t.text=cf(t.text,e,i)})),t}function df(t){const e={},i={},r=[];let n=0;function o(e){r.push(t[e]),n++}function a(t,e,n){const o=i[t];return delete i[t],i[e]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(n[0]),o}function s(t,i,n){const o=e[i];return delete e[i],e[t]=o,r[o].geometry[0].shift(),r[o].geometry[0]=n[0].concat(r[o].geometry[0]),o}function l(t,e,i){const r=i?e[0][e[0].length-1]:e[0][0];return`${t}:${r.x}:${r.y}`}for(let h=0;ht.geometry))}const pf={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function ff(t,e){let i="";for(let r=0;r>1,c=-7,u=i?n-1:0,d=i?-1:1,p=t[e+u];for(u+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+u],u+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+u],u+=d,c-=8);if(0===o)o=1-h;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=h}return(p?-1:1)*a*Math.pow(2,o-r)},gf=function(t,e,i,r,n,o){var a,s,l,h=8*o-n-1,c=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(e*l-1)*Math.pow(2,n),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;t[i+p]=255&s,p+=f,s/=256,n-=8);for(a=a<0;t[i+p]=255&a,p+=f,a/=256,h-=8);t[i+p-f]|=128*m},yf={read:_f,write:gf},xf=bf;function bf(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}bf.Varint=0,bf.Fixed64=1,bf.Bytes=2,bf.Fixed32=5;var wf=4294967296,zf=1/wf,Mf=12,Tf="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ef(t,e,i){var r,n,o=i.buf;if(r=(112&(n=o[i.pos++]))>>4,n<128)return Cf(t,r,e);if(r|=(127&(n=o[i.pos++]))<<3,n<128)return Cf(t,r,e);if(r|=(127&(n=o[i.pos++]))<<10,n<128)return Cf(t,r,e);if(r|=(127&(n=o[i.pos++]))<<17,n<128)return Cf(t,r,e);if(r|=(127&(n=o[i.pos++]))<<24,n<128)return Cf(t,r,e);if(r|=(1&(n=o[i.pos++]))<<31,n<128)return Cf(t,r,e);throw new Error("Expected varint not more than 10 bytes")}function Af(t){return t.type===bf.Bytes?t.readVarint()+t.pos:t.pos+1}function Cf(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Sf(t,e){var i,r;if(t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),If(i,r,e),Pf(r,e)}function If(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}function Pf(t,e){var i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}function kf(t,e,i){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(r);for(var n=i.pos-1;n>=t;n--)i.buf[n+r]=i.buf[n]}function Lf(t,e){for(var i=0;i>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function Gf(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function qf(t,e,i){for(var r="",n=e;n239?4:l>223?3:l>191?2:1;if(n+c>i)break;1===c?l<128&&(h=l):2===c?128==(192&(o=t[n+1]))&&(h=(31&l)<<6|63&o)<=127&&(h=null):3===c?(o=t[n+1],a=t[n+2],128==(192&o)&&128==(192&a)&&((h=(15&l)<<12|(63&o)<<6|63&a)<=2047||h>=55296&&h<=57343)&&(h=null)):4===c&&(o=t[n+1],a=t[n+2],s=t[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((h=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,c=1):h>65535&&(h-=65536,r+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),r+=String.fromCharCode(h),n+=c}return r}function Zf(t,e,i){return Tf.decode(t.subarray(e,i))}function Hf(t,e,i){for(var r,n,o=0;o55295&&r<57344){if(!n){r>56319||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):n=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,n=r;continue}r=n-55296<<10|r-56320|65536,n=null}else n&&(t[i++]=239,t[i++]=191,t[i++]=189,n=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}bf.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&r,t(n,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Vf(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Gf(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Vf(this.buf,this.pos)+Vf(this.buf,this.pos+4)*wf;return this.pos+=8,t},readSFixed64:function(){var t=Vf(this.buf,this.pos)+Gf(this.buf,this.pos+4)*wf;return this.pos+=8,t},readFloat:function(){var t=yf.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=yf.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,r=this.buf;return e=127&(i=r[this.pos++]),i<128?e:(e|=(127&(i=r[this.pos++]))<<7,i<128?e:(e|=(127&(i=r[this.pos++]))<<14,i<128?e:(e|=(127&(i=r[this.pos++]))<<21,i<128?e:Ef(e|=(15&(i=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=Mf&&Tf?Zf(this.buf,e,t):qf(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==bf.Bytes)return t.push(this.readVarint(e));var i=Af(this);for(t=t||[];this.pos127;);else if(e===bf.Bytes)this.pos=this.readVarint()+this.pos;else if(e===bf.Fixed32)this.pos+=4;else{if(e!==bf.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?Sf(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=Hf(this.buf,t,this.pos);var i=this.pos-e;i>=128&&kf(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),yf.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),yf.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i=128&&kf(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,i){this.writeTag(t,bf.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Lf,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Df,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Bf,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Rf,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Of,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Ff,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Nf,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Uf,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,jf,e)},writeBytesField:function(t,e){this.writeTag(t,bf.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,bf.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,bf.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,bf.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,bf.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,bf.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,bf.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,bf.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,bf.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,bf.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};const Wf=3;function Xf(t,e,i){e.glyphs=[],1===t&&i.readMessage(Yf,e)}function Yf(t,e,i){if(3===t){const{id:t,bitmap:r,width:n,height:o,left:a,top:s,advance:l}=i.readMessage(Kf,{});e.glyphs.push({id:t,bitmap:new zu({width:n+2*Wf,height:o+2*Wf},r),metrics:{width:n,height:o,left:a,top:s,advance:l}})}else 4===t?e.ascender=i.readSVarint():5===t&&(e.descender=i.readSVarint())}function Kf(t,e,i){1===t?e.id=i.readVarint():2===t?e.bitmap=i.readBytes():3===t?e.width=i.readVarint():4===t?e.height=i.readVarint():5===t?e.left=i.readSVarint():6===t?e.top=i.readSVarint():7===t&&(e.advance=i.readVarint())}function Jf(t){return new xf(t).readFields(Xf,{})}const Qf=Wf;function tm(t){let e=0,i=0;for(const r of t)e+=r.w*r.h,i=Math.max(i,r.w);t.sort(((t,e)=>e.h-t.h));const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),i),h:1/0}];let n=0,o=0;for(const e of t)for(let t=r.length-1;t>=0;t--){const i=r[t];if(!(e.w>i.w||e.h>i.h)){if(e.x=i.x,e.y=i.y,o=Math.max(o,e.y+e.h),n=Math.max(n,e.x+e.w),e.w===i.w&&e.h===i.h){const e=r.pop();tt.hasImage(e))),t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const i in t.updatedImages)this.patchUpdatedImage(this.iconPositions[i],t.getImage(i),e),this.patchUpdatedImage(this.patternPositions[i],t.getImage(i),e)}patchUpdatedImage(t,e,i){if(!t||!e)return;if(t.version===e.version)return;t.version=e.version;const[r,n]=t.tl;i.update(e.data,void 0,{x:r,y:n})}}ba(im,"ImagePosition"),ba(rm,"ImageAtlas");const nm={horizontal:1,vertical:2,horizontalOnly:3},om=-17;function am(t){for(const e of t)if(0!==e.positionedGlyphs.length)return!1;return!0}const sm=57344,lm=63743;class hm{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(t,e){const i=new hm;return i.scale=t||1,i.fontStack=e,i}static forImage(t){const e=new hm;return e.imageName=t,e}}class cm{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,e){const i=new cm;for(let r=0;r=0&&i>=t&&pm[this.text.charCodeAt(i)];i--)e--;this.text=this.text.substring(t,e),this.sectionIndex=this.sectionIndex.slice(t,e)}substring(t,e){const i=new cm;return i.text=this.text.substring(t,e),i.sectionIndex=this.sectionIndex.slice(t,e),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,e)=>Math.max(t,this.sections[e].scale)),0)}addTextSection(t,e){this.text+=t.text,this.sections.push(hm.forText(t.scale,t.fontStack||e));const i=this.sections.length-1;for(let e=0;e=lm?null:++this.imageSectionID:(this.imageSectionID=sm,this.imageSectionID)}}function um(t,e){const i=[],r=t.text;let n=0;for(const r of e)i.push(t.substring(n,r)),n=r;return n=0;let c=0;for(let i=0;i0&&o>x&&(x=o)}else{const t=i[s.fontStack];if(!t)continue;t[m]&&(z=t[m]);const r=e[s.fontStack];if(!r)continue;const o=r.glyphs[m];if(!o)continue;if(g=o.metrics,T=8203!==m?nf:0,v){const t=void 0!==r.ascender?Math.abs(r.ascender):0,e=void 0!==r.descender?Math.abs(r.descender):0,i=(t+e)*_;b-i/2;){if(a--,a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;const l=[];let h=0;for(;sr;)h-=l.shift().angleDelta;if(h>n)return!1;a++,s+=i.dist(o)}return!0}function Im(t){let e=0;for(let i=0;ih){const c=(h-l)/o,u=yr(r.x,n.x,c),d=yr(r.y,n.y,c),p=new Cm(u,d,0,n.angleTo(r),i);return!a||Sm(t,p,s,a,e)?p:void 0}l+=o}}function Dm(t,e,i,r,n,o,a,s,l){const h=Pm(r,o,a),c=km(r,n),u=c*a,d=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-u=0&&_=0&&g=0&&d+h<=c){const i=new Cm(_,g,0,m,e);i._round(),r&&!Sm(t,i,o,r,n)||p.push(i)}}u+=f}return s||p.length||a||(p=Rm(t,u/2,i,r,n,o,a,!0,l)),p}function Om(t,e,i,r,o){const a=[];for(let s=0;s=r&&c.x>=r||(s.x>=r?s=new n(r,s.y+(c.y-s.y)*((r-s.x)/(c.x-s.x)))._round():c.x>=r&&(c=new n(r,s.y+(c.y-s.y)*((r-s.x)/(c.x-s.x)))._round()),s.y>=o&&c.y>=o||(s.y>=o?s=new n(s.x+(c.x-s.x)*((o-s.y)/(c.y-s.y)),o)._round():c.y>=o&&(c=new n(s.x+(c.x-s.x)*((o-s.y)/(c.y-s.y)),o)._round()),h&&s.equals(h[h.length-1])||(h=[s],a.push(h)),h.push(c)))))}}return a}function Bm(t,e,i,r,n){const o=256*e,a=o+255,s=r.transformRequest(r.normalizeGlyphsURL(i).replace("{fontstack}",t).replace("{range}",`${o}-${a}`),ce.Glyphs);ge(s,((t,e)=>{if(t)n(t);else if(e){const t={},i=Jf(e);for(const e of i.glyphs)t[e.id]=e;n(null,{glyphs:t,ascender:i.ascender,descender:i.descender})}}))}ba(Cm,"Anchor");const Fm=1e20;class Nm{constructor({fontSize:t=24,buffer:e=3,radius:i=8,cutoff:r=.25,fontFamily:n="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=e,this.cutoff=r,this.radius=i;const s=this.size=t+4*e,l=this._createCanvas(s),h=this.ctx=l.getContext("2d",{willReadFrequently:!0});h.font=`${a} ${o} ${t}px ${n}`,h.textBaseline="alphabetic",h.textAlign="left",h.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}draw(t){const{width:e,actualBoundingBoxAscent:i,actualBoundingBoxDescent:r,actualBoundingBoxLeft:n,actualBoundingBoxRight:o}=this.ctx.measureText(t),a=Math.ceil(i),s=0,l=Math.min(this.size-this.buffer,Math.ceil(o-n)),h=Math.min(this.size-this.buffer,a+Math.ceil(r)),c=l+2*this.buffer,u=h+2*this.buffer,d=Math.max(c*u,0),p=new Uint8ClampedArray(d),f={data:p,width:c,height:u,glyphWidth:l,glyphHeight:h,glyphTop:a,glyphLeft:s,glyphAdvance:e};if(0===l||0===h)return f;const{ctx:m,buffer:v,gridInner:_,gridOuter:g}=this;m.clearRect(v,v,l,h),m.fillText(t,v,v+a);const y=m.getImageData(v,v,l,h);g.fill(Fm,0,d),_.fill(0,0,d);for(let t=0;t0?t*t:0,_[r]=t<0?t*t:0}}Um(g,0,0,c,u,c,this.f,this.v,this.z),Um(_,v,v,l,h,c,this.f,this.v,this.z);for(let t=0;t-1);l++,o[l]=s,a[l]=h,a[l+1]=Fm}for(let s=0,l=0;s{let r=this.entries[t];r||(r=this.entries[t]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let n=r.glyphs[e];if(void 0!==n)return void i(null,{stack:t,id:e,glyph:n});if(n=this._tinySDF(r,t,e),n)return r.glyphs[e]=n,void i(null,{stack:t,id:e,glyph:n});const o=Math.floor(e/256);if(256*o>65535)return void i(new Error("glyphs > 65535 not supported"));if(r.ranges[o])return void i(null,{stack:t,id:e,glyph:n});let a=r.requests[o];a||(a=r.requests[o]=[],Gm.loadGlyphRange(t,o,this.url,this.requestManager,((t,e)=>{if(e){r.ascender=e.ascender,r.descender=e.descender;for(const t in e.glyphs)this._doesCharSupportLocalGlyph(+t)||(r.glyphs[+t]=e.glyphs[+t]);r.ranges[o]=!0}for(const i of a)i(t,e);delete r.requests[o]}))),a.push(((r,n)=>{r?i(r):n&&i(null,{stack:t,id:e,glyph:n.glyphs[e]||null})}))}),((t,i)=>{if(t)e(t);else if(i){const t={};for(const{stack:e,id:r,glyph:n}of i)void 0===t[e]&&(t[e]={}),void 0===t[e].glyphs&&(t[e].glyphs={}),t[e].glyphs[r]=n&&{id:n.id,bitmap:n.bitmap.clone(),metrics:n.metrics},t[e].ascender=this.entries[e].ascender,t[e].descender=this.entries[e].descender;e(null,t)}}))}_doesCharSupportLocalGlyph(t){return this.localGlyphMode!==$m.none&&(this.localGlyphMode===$m.all?!!this.localFontFamily:!!this.localFontFamily&&(Aa["CJK Unified Ideographs"](t)||Aa["Hangul Syllables"](t)||Aa.Hiragana(t)||Aa.Katakana(t)||Aa["CJK Symbols and Punctuation"](t)))}_tinySDF(t,e,i){const r=this.localFontFamily;if(!r||!this._doesCharSupportLocalGlyph(i))return;let n=t.tinySDF;if(!n){let i="400";/bold/i.test(e)?i="900":/medium/i.test(e)?i="500":/light/i.test(e)&&(i="200");const o=24*Vm,a=3*Vm,s=8*Vm;n=t.tinySDF=new Gm.TinySDF({fontFamily:r,fontWeight:i,fontSize:o,buffer:a,radius:s}),n.fontWeight=i}if(this.localGlyphs[n.fontWeight][i])return this.localGlyphs[n.fontWeight][i];const o=String.fromCharCode(i),{data:a,width:s,height:l,glyphWidth:h,glyphHeight:c,glyphLeft:u,glyphTop:d,glyphAdvance:p}=n.draw(o),f=27;return this.localGlyphs[n.fontWeight][i]={id:i,bitmap:new zu({width:s,height:l},a),metrics:{width:h/Vm,height:c/Vm,left:u/Vm,top:d/Vm-f,advance:p/Vm,localGlyph:!0}}}}Gm.loadGlyphRange=Bm,Gm.TinySDF=Nm;const qm=em;function Zm(t,e,i,r){const o=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2*qm,h=a.paddedRect.h-2*qm,c=t.right-t.left,u=t.bottom-t.top,d=a.stretchX||[[0,l]],p=a.stretchY||[[0,h]],f=(t,e)=>t+e[1]-e[0],m=d.reduce(f,0),v=p.reduce(f,0),_=l-m,g=h-v;let y=0,x=m,b=0,w=v,z=0,M=_,T=0,E=g;if(a.content&&r){const t=a.content;y=Hm(d,0,t[0]),b=Hm(p,0,t[1]),x=Hm(d,t[0],t[2]),w=Hm(p,t[1],t[3]),z=t[0]-y,T=t[1]-b,M=t[2]-t[0]-x,E=t[3]-t[1]-w}const A=(r,o,l,h)=>{const d=Xm(r.stretch-y,x,c,t.left),p=Ym(r.fixed-z,M,r.stretch,m),f=Xm(o.stretch-b,w,u,t.top),_=Ym(o.fixed-T,E,o.stretch,v),g=Xm(l.stretch-y,x,c,t.left),A=Ym(l.fixed-z,M,l.stretch,m),C=Xm(h.stretch-b,w,u,t.top),S=Ym(h.fixed-T,E,h.stretch,v),I=new n(d,f),P=new n(g,f),k=new n(g,C),L=new n(d,C),D=new n(p/s,_/s),R=new n(A/s,S/s),O=e*Math.PI/180;if(O){const t=Math.sin(O),e=Math.cos(O),i=[e,-t,t,e];I._matMult(i),P._matMult(i),L._matMult(i),k._matMult(i)}const B=r.stretch+r.fixed,F=l.stretch+l.fixed,N=o.stretch+o.fixed,U=h.stretch+h.fixed;return{tl:I,tr:P,bl:L,br:k,tex:{x:a.paddedRect.x+qm+B,y:a.paddedRect.y+qm+N,w:F-B,h:U-N},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:R,minFontScaleX:M/s/c,minFontScaleY:E/s/u,isSDF:i}};if(r&&(a.stretchX||a.stretchY)){const t=Wm(d,_,m),e=Wm(p,g,v);for(let i=0;i0?[e,-i]:r<0?[-e,i]:0===e?[i,e]:[i,-e]}function Jm(t,e,i,r){const n=e+t.positionedLines[r].lineOffset;return 0===r?i+n/2:i+(n+(e+t.positionedLines[r-1].lineOffset))/2}function Qm(t,e,i,r,o,a,s,l){const h=[];if(0===e.positionedLines.length)return h;const c=r.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=Km(i);let d=Math.abs(e.top-e.bottom);for(const t of e.positionedLines)d-=t.lineOffset;const p=e.positionedLines.length,f=d/p;let m=e.top-i[1];for(let t=0;t0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:i}=this,r=e[t];for(;t>0;){const n=t-1>>1,o=e[n];if(i(r,o)>=0)break;e[t]=o,t=n}e[t]=r}_down(t){const{data:e,compare:i}=this,r=this.length>>1,n=e[t];for(;t=0)break;e[t]=o,t=r}e[t]=n}}function ev(t,e){return te?1:0}function iv(t,e=1,i=!1){let r=1/0,o=1/0,a=-1/0,s=-1/0;const l=t[0];for(let t=0;ta)&&(a=e.x),(!t||e.y>s)&&(s=e.y)}const h=a-r,c=s-o,u=Math.min(h,c);let d=u/2;const p=new tv([],rv);if(0===u)return new n(r,o);for(let e=r;ef.d||!f.d)&&(f=r,i&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,m)),r.max-f.d<=e||(d=r.h/2,p.push(new nv(r.p.x-d,r.p.y-d,d,t)),p.push(new nv(r.p.x+d,r.p.y-d,d,t)),p.push(new nv(r.p.x-d,r.p.y+d,d,t)),p.push(new nv(r.p.x+d,r.p.y+d,d,t)),m+=4)}return i&&(console.log(`num probes: ${m}`),console.log(`best distance: ${f.d}`)),f.p}function rv(t,e){return e.max-t.max}function nv(t,e,i,r){this.p=new n(t,e),this.h=i,this.d=ov(this.p,r),this.max=this.d+this.h*Math.SQRT2}function ov(t,e){let i=!1,r=1/0;for(let n=0;nt.y!=s.y>t.y&&t.x<(s.x-n.x)*(t.y-n.y)/(s.y-n.y)+n.x&&(i=!i),r=Math.min(r,Oh(t,n,s))}}return(i?1:-1)*Math.sqrt(r)}function av(t){let e=0,i=0,r=0;const n=t[0];for(let t=0,o=n.length,a=o-1;tt*nf))}let y=f?"center":u.get("text-justify").evaluate(o,{},s);const b=u.get("symbol-placement"),w="point"===b,z="point"===b?u.get("text-max-width").evaluate(o,{},s)*nf:0,M=o=>{t.allowVerticalPlacement&&Ca(r)&&(_.vertical=dm(g,e,i,n,l,z,h,m,o,p,x,nm.vertical,!0,b,d,c))};if(!f&&v){const t="auto"===y?v.map((t=>dv(t))):[y];let r=!1;for(let o=0;o=0||!Ca(r)){const t=dm(g,e,i,n,l,z,h,m,y,p,x,nm.horizontal,!1,b,d,c);t&&(_.horizontal[y]=t)}M("point"===b?"left":y)}}let b=!1;if(o.icon&&o.icon.name){const e=r[o.icon.name];e&&(y=Em(n[o.icon.name],u.get("icon-offset").evaluate(o,{},s),u.get("icon-anchor").evaluate(o,{},s)),b=e.sdf,void 0===t.sdfIcons?t.sdfIcons=e.sdf:t.sdfIcons!==e.sdf&&V("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.pixelRatio||0!==u.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}const w=gv(_.horizontal)||_.vertical;t.iconsInText||(t.iconsInText=!!w&&w.iconsInText),(w||y)&&fv(t,o,_,y,r,p,d,v,x,b,a,s,h)}o&&t.generateCollisionDebugBuffers(l,t.collisionBoxArray)}function dv(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function pv(t,e){e>18&&t>2&&(t>>=1);const i=Ql/(512*t);return Math.max(i,1)}function fv(t,e,i,r,n,o,a,s,h,c,u,d,p){let f=o.textMaxSize.evaluate(e,{},d);void 0===f&&(f=a);const m=t.layers[0].layout,v=m.get("icon-offset").evaluate(e,{},d),_=gv(i.horizontal)||i.vertical,g="globe"===p.name,y=nf,x=a/y,b=t.tilePixelRatio*f/y,w=t.tilePixelRatio*s,z=pv(t.overscaling,t.zoom)*m.get("symbol-spacing"),M=m.get("text-padding")*t.tilePixelRatio,T=m.get("icon-padding")*t.tilePixelRatio,E=l(m.get("text-max-angle")),A="map"===m.get("text-rotation-alignment")&&"point"!==m.get("symbol-placement"),C="map"===m.get("icon-rotation-alignment")&&"point"!==m.get("symbol-placement"),S=m.get("symbol-placement"),I=z/2,P=m.get("icon-text-fit");let k;r&&"none"!==P&&(t.allowVerticalPlacement&&i.vertical&&(k=Am(r,i.vertical,P,m.get("icon-text-fit-padding"),v,x)),_&&(r=Am(r,_,P,m.get("icon-text-fit-padding"),v,x)));const L=(a,s,l)=>{if(s.x<0||s.x>=Ql||s.y<0||s.y>=Ql)return;let f=null;if(g){const{x:t,y:e,z:i}=p.projectTilePoint(s.x,s.y,l);f={anchor:new Cm(t,e,i,0,void 0),up:p.upVector(l,s.x,s.y)}}bv(t,s,f,a,i,r,n,k,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,M,A,h,w,T,C,v,e,o,c,u,d)};if("line"===S)for(const n of Om(e.geometry,0,0,Ql,Ql)){const e=Dm(n,z,E,i.vertical||_,r,y,b,t.overscaling,Ql);for(const i of e){const e=_;e&&wv(t,e.text,I,i)||L(n,i,d)}}else if("line-center"===S){for(const t of e.geometry)if(t.length>1){const e=Lm(t,E,i.vertical||_,r,y,b);e&&L(t,e,d)}}else if("Polygon"===e.type)for(const t of gd(e.geometry,0)){const e=iv(t,16);L(t[0],new Cm(e.x,e.y,0,0,void 0),d)}else if("LineString"===e.type)for(const t of e.geometry)L(t,new Cm(t[0].x,t[0].y,0,0,void 0),d);else if("Point"===e.type)for(const t of e.geometry)for(const e of t)L([e],new Cm(e.x,e.y,0,0,void 0),d)}const mv=255,vv=mv*of;function _v(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v){const _=Qm(i,r,l,o,a,s,n,t.allowVerticalPlacement),g=t.textSizeData;let y=null;"source"===g.kind?(y=[of*o.layout.get("text-size").evaluate(s,{},v)],y[0]>vv&&V(`${t.layerIds[0]}: Value for "text-size" is >= ${mv}. Reduce your "text-size".`)):"composite"===g.kind&&(y=[of*f.compositeTextSizes[0].evaluate(s,{},v),of*f.compositeTextSizes[1].evaluate(s,{},v)],(y[0]>vv||y[1]>vv)&&V(`${t.layerIds[0]}: Value for "text-size" is >= ${mv}. Reduce your "text-size".`)),t.addSymbols(t.text,_,y,l,a,s,c,e,i,h.lineStartIndex,h.lineLength,p,m,v);for(const e of u)d[e]=t.text.placedSymbolArray.length-1;return 4*_.length}function gv(t){for(const e in t)return t[e];return null}function yv(t,e,i,r,o,a,s,h,c,u){let d=s.top,p=s.bottom,f=s.left,m=s.right;const v=s.collisionPadding;if(v&&(f-=v[0],d-=v[1],m+=v[2],p+=v[3]),c){const t=new n(f,d),e=new n(m,d),i=new n(f,p),r=new n(m,p),o=l(c);let a=new n(0,0);u&&(a=new n(u[0],u[1])),t._rotateAround(o,a),e._rotateAround(o,a),i._rotateAround(o,a),r._rotateAround(o,a),f=Math.min(t.x,e.x,i.x,r.x),m=Math.max(t.x,e.x,i.x,r.x),d=Math.min(t.y,e.y,i.y,r.y),p=Math.max(t.y,e.y,i.y,r.y)}return t.emplaceBack(e.x,e.y,e.z,i.x,i.y,f,d,m,p,h,r,o,a),t.length-1}function xv(t){t.collisionPadding&&(t.top-=t.collisionPadding[1],t.bottom+=t.collisionPadding[3]);const e=t.bottom-t.top;return e>0?Math.max(10,e):null}function bv(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x,b,w,z,M){const T=t.addToLineVertexArray(e,r);let E,A,C,S,I,P,k,L=0,D=0,R=0,O=0,B=-1,F=-1;const N={};let U=ml("");const j=i?i.anchor:e;let $=0,G=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[$,G]=l.layout.get("text-offset").evaluate(x,{},M).map((t=>t*nf)):($=l.layout.get("text-radial-offset").evaluate(x,{},M)*nf,G=lv),t.allowVerticalPlacement&&n.vertical){const t=n.vertical;if(f)P=xv(t),s&&(k=xv(s));else{const i=l.layout.get("text-rotate").evaluate(x,{},M)+90;C=yv(h,j,e,c,u,d,t,p,i,m),s&&(S=yv(h,j,e,c,u,d,s,_,i))}}if(o){const r=l.layout.get("icon-rotate").evaluate(x,{},M),n="none"!==l.layout.get("icon-text-fit"),a=Zm(o,r,w,n),p=s?Zm(s,r,w,n):void 0;A=yv(h,j,e,c,u,d,o,_,r),L=4*a.length;const f=t.iconSizeData;let m=null;"source"===f.kind?(m=[of*l.layout.get("icon-size").evaluate(x,{},M)],m[0]>vv&&V(`${t.layerIds[0]}: Value for "icon-size" is >= ${mv}. Reduce your "icon-size".`)):"composite"===f.kind&&(m=[of*b.compositeIconSizes[0].evaluate(x,{},M),of*b.compositeIconSizes[1].evaluate(x,{},M)],(m[0]>vv||m[1]>vv)&&V(`${t.layerIds[0]}: Value for "icon-size" is >= ${mv}. Reduce your "icon-size".`)),t.addSymbols(t.icon,a,m,y,g,x,!1,i,e,T.lineStartIndex,T.lineLength,-1,z,M),B=t.icon.placedSymbolArray.length-1,p&&(D=4*p.length,t.addSymbols(t.icon,p,m,y,g,x,nm.vertical,i,e,T.lineStartIndex,T.lineLength,-1,z,M),F=t.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const o=n.horizontal[r];E||(U=ml(o.text),f?I=xv(o):E=yv(h,j,e,c,u,d,o,p,l.layout.get("text-rotate").evaluate(x,{},M),m));const s=1===o.positionedLines.length;if(R+=_v(t,i,e,o,a,l,f,x,m,T,n.vertical?nm.horizontal:nm.horizontalOnly,s?Object.keys(n.horizontal):[r],N,B,b,z,M),s)break}n.vertical&&(O+=_v(t,i,e,n.vertical,a,l,f,x,m,T,nm.vertical,["vertical"],N,F,b,z,M));let q=-1;const Z=(t,e)=>t?Math.max(t,e):e;q=Z(I,q),q=Z(P,q),q=Z(k,q);const H=q>-1?1:0;t.glyphOffsetArray.length>=ig.MAX_GLYPHS&&V("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey);const W=j;t.symbolInstances.emplaceBack(W.x,W.y,W.z,e.x,e.y,N.right>=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical>=0?N.vertical:-1,B,F,U,void 0!==E?E:t.collisionBoxArray.length,void 0!==E?E+1:t.collisionBoxArray.length,void 0!==C?C:t.collisionBoxArray.length,void 0!==C?C+1:t.collisionBoxArray.length,void 0!==A?A:t.collisionBoxArray.length,void 0!==A?A+1:t.collisionBoxArray.length,S||t.collisionBoxArray.length,S?S+1:t.collisionBoxArray.length,c,R,O,L,D,H,0,$,G,q)}function wv(t,e,i,r){const n=t.compareText;if(e in n){const t=n[e];for(let e=t.length-1;e>=0;e--)if(r.dist(t[e])1?null:$v(t.a[e],t.b[e],t.angle,y(i,0,1))+t.center[e]}function qv(t){if(t.z<=1)return Uv[t.z+2*t.y+t.x];const[e,i]=Hv(t),r=[Xv(e[0],e[1]),Xv(e[0],i[1]),Xv(i[0],e[1]),Xv(i[0],i[1])],n=[Nv,Nv,Nv],o=[Fv,Fv,Fv];for(const t of r)n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),o[0]=Math.max(o[0],t[0]),o[1]=Math.max(o[1],t[1]),o[2]=Math.max(o[2],t[2]);return new du(n,o)}function Zv(t,e,i){const r=e/t.worldSize,n=Number.MAX_VALUE,o=[-n,-n,-n],a=[n,n,n],s=rc(new Float64Array(16));if(sc(s,s,[r,r,r]),oc(s,s,t.globeMatrix),i.z<=1){const t=qv(i).getCorners();for(let e=0;e.5?z-=1:z<-.5&&(z+=1),Math.abs(z)>Math.abs(M))w=z>=0?1:3,b=p;else{w=M>=0?0:2;const t=[s[4],s[5],s[6]];let e;e=M>=0?-Math.sin(l(u.getSouth()))*kv:-Math.sin(l(u.getNorth()))*kv,b=Ic(b,p,t,e)}const T=d[w],E=d[(w+1)%4],A=new Vv(T,E,b),C=[Gv(A,0)||T[0],Gv(A,1)||T[1],Gv(A,2)||T[2]];return a[2]=Math.min(T[2],E[2]),Ac(a,a,C),Cc(o,o,C),new du(a,o)}function Hv(t){const e=1<0;return 0===r&&!n&&!a&&o}function c_(t,e,i){const[r,n]=e,o=1/Rv,a=(n[1]-r[1])*o,s=Ov[i],l=(n[0]-r[0])/s;return[0,a,1<Math.PI/2*1.01}const v_=l(85),__=Math.cos(v_),g_=Math.sin(v_);class y_{constructor(t){this._createGrid(t),this._createPoles(t)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(const t of this._poleSegments)t.destroy();for(const t of this._gridSegments)t.destroy();if(this._wireframeIndexBuffer){this._wireframeIndexBuffer.destroy();for(const t of this._wireframeSegments)t.destroy()}}_createGrid(t){const e=new zs,i=new Ns,r=Rv,n=r+1;for(let t=0;ty&&(x(t,h,r,n,s,l),x(h,i,s,l,o,a))}x(u,d,r,o,n,o),x(d,p,n,o,n,a),x(p,f,n,a,r,a),x(f,u,r,a,r,o),m-=y,v-=y,_+=y,g+=y;const b=1/Math.max(_-m,g-v);return{scale:b,x:m*b,y:v*b,x2:_*b,y2:g*b,projection:e}}function z_(t,e,i,r,n,o,a,s,l){if("globe"===l.name)return Zv(t,e,new up(i,r,n));const h=w_({z:i,x:r,y:n},l),c=h.x/h.scale,u=h.y/h.scale,d=h.x2/h.scale,p=h.y2/h.scale;return new du([(o+c)*e,e*u,a],[(o+d)*e,e*p,s])}function M_(t,{x:e,y:i},r=0){return new n(((e-r)*t.scale-t.x)*Ql,(i*t.scale-t.y)*Ql)}function T_(t,e,i=0){return wc(((e.x-i)*t.scale-t.x)*Ql,(e.y*t.scale-t.y)*Ql,ch(e.z,e.y))}const E_=rc(new Float32Array(16));class A_{constructor(t){this.spec=t,this.name=t.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(t,e){return{x:0,y:0,z:0}}unproject(t,e){return new ih(0,0)}projectTilePoint(t,e,i){return{x:t,y:e,z:0}}locationPoint(t,e,i=!0){return t._coordinatePoint(t.locationCoordinate(e),i)}pixelsPerMeter(t,e){return sh(1,t)*e}pixelSpaceConversion(t,e,i){return 1}farthestPixelDistance(t){return x_(t,t.pixelsPerMeter)}pointCoordinate(t,e,i,r){const o=t.horizonLineFromTop(!1),a=new n(e,Math.max(o,i));return t.rayIntersectionCoordinate(t.pointRayIntersection(a,r))}pointCoordinate3D(t,e,i){const r=new n(e,i);if(t.elevation)return t.elevation.pointCoordinate(r);{const e=this.pointCoordinate(t,r.x,r.y,0);return[e.x,e.y,e.z]}}isPointAboveHorizon(t,e){if(t.elevation)return!this.pointCoordinate3D(t,e.x,e.y);const i=t.horizonLineFromTop();return e.y0?e<-O_+i&&(e=-O_+i):e>O_-i&&(e=O_-i);const o=n/Math.pow(B_(e),r),a=o*Math.sin(r*t),s=n-o*Math.cos(r*t);return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+.5),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI,e=(2*(1-e)-.5)*Math.PI;const{n:i,f:r}=this,n=r-e,o=Math.sign(n),a=Math.sign(i)*Math.sqrt(t*t+n*n);let s=Math.atan2(t,Math.abs(n))*o;n*i<0&&(s-=Math.PI*Math.sign(t)*o);const l=y(h(s/i)+this.center[0],-180,180),c=y(h(2*Math.atan(Math.pow(r/a,1/i))-O_),-uh,uh);return new ih(l,c)}}class N_ extends A_{constructor(t){super(t),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(t,e){return{x:oh(t),y:ah(e),z:0}}unproject(t,e){const i=lh(t),r=hh(e);return new ih(i,r)}}const U_=l(uh);class j_ extends A_{project(t,e){const i=(e=l(e))*e,r=i*i,n=e*(1.007226+i*(.015085+r*(.028874*i-.044475-.005916*r)));return{x:.5*((t=l(t))*(.8707-.131979*i+r*(r*(.003971*i-.001529*r)-.013791))/Math.PI+.5),y:1-.5*(n/Math.PI+1),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI;const i=1e-6;let r=e=(2*(1-e)-1)*Math.PI,n=25,o=0,a=r*r;do{a=r*r;const t=a*a;o=(r*(1.007226+a*(.015085+t*(.028874*a-.044475-.005916*t)))-e)/(1.007226+a*(.045255+t*(.259866*a-.311325-.005916*11*t))),r=y(r-o,-U_,U_)}while(Math.abs(o)>i&&--n>0);a=r*r;const s=y(h(t/(.8707+a*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979))),-180,180),l=h(r);return new ih(s,l)}}const V_=l(uh);class $_ extends A_{project(t,e){e=l(e),t=l(t);const i=Math.cos(e),r=2/Math.PI,n=Math.acos(i*Math.cos(t/2)),o=Math.sin(n)/n,a=.5*(t*r+2*i*Math.sin(t/2)/o)||0,s=.5*(e+Math.sin(e)/o)||0;return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+1),z:0}}unproject(t,e){let i=t=(2*t-.5)*Math.PI,r=e=(2*(1-e)-1)*Math.PI,n=25;const o=1e-6;let a=0,s=0;do{const n=Math.cos(r),o=Math.sin(r),l=2*o*n,h=o*o,c=n*n,u=Math.cos(i/2),d=Math.sin(i/2),p=2*u*d,f=d*d,m=1-c*u*u,v=m?1/m:0,_=m?Math.acos(n*u)*Math.sqrt(1/m):0,g=.5*(2*_*n*d+2*i/Math.PI)-t,x=.5*(_*o+r)-e,b=.5*v*(c*f+_*n*u*h)+1/Math.PI,w=v*(p*l/4-_*o*d),z=.125*v*(l*d-_*o*c*p),M=.5*v*(h*u+_*f*n)+.5,T=w*z-M*b;a=(x*w-g*M)/T,s=(g*z-x*b)/T,i=y(i-a,-Math.PI,Math.PI),r=y(r-s,-V_,V_)}while((Math.abs(a)>o||Math.abs(s)>o)&&--n>0);return new ih(h(i),h(r))}}class G_ extends A_{constructor(t){super(t),this.center=t.center||[0,0],this.parallels=t.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(l(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(t,e){const{scale:i,cosPhi:r}=this;return{x:l(t)*r*i+.5,y:-Math.sin(l(e))/r*i+.5,z:0}}unproject(t,e){const{scale:i,cosPhi:r}=this,n=-(e-.5)/i,o=y(h((t-.5)/i)/r,-180,180),a=n*r,s=Math.asin(y(a,-1,1)),l=y(h(s),-uh,uh);return new ih(o,l)}}class q_ extends N_{constructor(t){super(t),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug","custom"],this.range=[3,5]}projectTilePoint(t,e,i){const r=Math.pow(2,i.z),n=(t/Ql+i.x)/r,o=Xv(hh((e/Ql+i.y)/r),lh(n));return Oc(o,o,Qv(qv(i))),{x:o[0],y:o[1],z:o[2]}}locationPoint(t,e){const i=Xv(e.lat,e.lng),r=Lc([],i),o=t.elevation?t.elevation.getAtPointOrZero(t.locationCoordinate(e),t._centerAltitude):t._centerAltitude;Ic(i,i,r,sh(1,0)*Ql*o);const a=rc(new Float64Array(16));return oc(a,t.pixelMatrix,t.globeMatrix),Oc(i,i,a),new n(i[0],i[1])}pixelsPerMeter(t,e){return sh(1,0)*e}pixelSpaceConversion(t,e,i){const r=yr(sh(1,Pv)*e,sh(1,t)*e,i);return this.pixelsPerMeter(t,e)/r}createTileMatrix(t,e,i){const r=t_(qv(i.canonical));return oc(new Float64Array(16),t.globeMatrix,r)}createInversionMatrix(t,e){const{center:i}=t,r=rc(new Float64Array(16));return oc(r,r,Qv(qv(e))),hc(r,r,l(i.lng)),lc(r,r,l(i.lat)),sc(r,r,[t._projectionScaler,t._projectionScaler,1]),Float32Array.from(r)}pointCoordinate(t,e,i,r){const n=jv(t,e,i,!0);return n||new ph(0,0)}pointCoordinate3D(t,e,i){const r=this.pointCoordinate(t,e,i,0);return[r.x,r.y,r.z]}isPointAboveHorizon(t,e){return!jv(t,e.x,e.y,!1)}farthestPixelDistance(t){const e=b_(t,this.pixelsPerMeter(t.center.lat,t.worldSize)),i=s_(t.zoom);if(i>0){const r=x_(t,sh(1,t.center.lat)*t.worldSize),n=t.worldSize/(2*Math.PI),o=Math.max(t.width,t.height)/t.worldSize*Math.PI;return yr(e,r+n*(1-Math.cos(o)),Math.pow(i,10))}return e}upVector(t,e,i){const r=1<0&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,Kp.members,!0)),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}ba(tg,"SymbolBuffers");class eg{constructor(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new Jl,this.collisionVertexArray=new Bs,this.collisionVertexArrayExt=new Fs}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Qp.members,!0),this.collisionVertexBufferExt=t.createVertexBuffer(this.collisionVertexArrayExt,tf.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}ba(eg,"CollisionBuffers");class ig{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=rc([]),this.placementViewportMatrix=rc([]);const e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=af(this.zoom,e["text-size"]),this.iconSizeData=af(this.zoom,e["icon-size"]);const i=this.layers[0].layout,r=i.get("symbol-sort-key"),n=i.get("symbol-z-order");this.canOverlap=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==n&&void 0!==r.constantOr(1);const o="viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&this.canOverlap,this.writingModes=i.get("text-writing-mode").map((t=>nm[t])),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.sourceID=t.sourceID,this.projection=t.projection}createArrays(){this.text=new tg(new Vl(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new tg(new Vl(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new rl,this.lineVertexArray=new nl,this.symbolInstances=new il}calculateGlyphDependencies(t,e,i,r,n){for(let i=0;i0)&&("constant"!==s.value.kind||s.value.value.length>0),u="constant"!==h.value.kind||!!h.value.value||Object.keys(h.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!c&&!u)return;const p=e.iconDependencies,f=e.glyphDependencies,m=e.availableImages,v=new Qa(this.zoom);for(const{feature:e,id:l,index:h,sourceLayerIndex:_}of t){const t=n._featureFilter.needGeometry,g=Mh(e,t);if(!n._featureFilter.filter(v,g,i))continue;if(t||(g.geometry=zh(e,i,r)),a&&1!==e.type&&i.z<=5){const t=g.geometry,e=1<t),((t,i)=>Dc(Xv(hh((t.y/Ql+n)/e),lh((t.x/Ql+r)/e),1),Xv(hh((i.y/Ql+n)/e),lh((i.x/Ql+r)/e),1))=0;for(const i of y.sections)if(i.image)p[i.image.name]=!0;else{const r=Ca(y.toString()),n=i.fontStack||t,o=f[n]=f[n]||{};this.calculateGlyphDependencies(i.text,o,e,this.allowVerticalPlacement,r)}}}"line"===o.get("symbol-placement")&&(this.features=df(this.features)),this.sortFeaturesByKey&&this.features.sort(((t,e)=>t.sortKey-e.sortKey))}update(t,e,i,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,i,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,i,r))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=Z_(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const i=this.lineVertexArray.length,r=t.segment;if(void 0!==r){let i=t.dist(e[r+1]),n=t.dist(e[r]);const o={};for(let t=r+1;t=0;t--)o[t]={x:e[t].x,y:e[t].y,tileUnitDistanceFromAnchor:n},t>0&&(n+=e[t-1].dist(e[t]));for(let t=0;t=0?e.rightJustifiedTextSymbolIndex:e.centerJustifiedTextSymbolIndex>=0?e.centerJustifiedTextSymbolIndex:e.leftJustifiedTextSymbolIndex>=0?e.leftJustifiedTextSymbolIndex:e.verticalPlacedTextSymbolIndex>=0?e.verticalPlacedTextSymbolIndex:r,o=this.text.placedSymbolArray.get(n),a=sf(this.textSizeData,t,o)/nf;return this.tilePixelRatio*a}getSymbolInstanceIconSize(t,e,i){const r=this.icon.placedSymbolArray.get(i),n=sf(this.iconSizeData,t,r);return this.tilePixelRatio*n}_commitDebugCollisionVertexUpdate(t,e,i){t.emplaceBack(e,-i,-i),t.emplaceBack(e,i,-i),t.emplaceBack(e,i,i),t.emplaceBack(e,-i,i)}_updateTextDebugCollisionBoxes(t,e,i,r,n,o){for(let a=r;a0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const i=t.placedSymbolArray.get(e),r=i.vertexStartIndex+4*i.numGlyphs;for(let e=i.vertexStartIndex;er[t]-r[e]||n[e]-n[t])),o}addToSortKeyRanges(t,e){const i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===e?i.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach(((t,e,i)=>{t>=0&&i.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)})),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}function rg(t,e){return e.replace(/{([^{}]+)}/g,((e,i)=>i in t?String(t[i]):""))}ba(ig,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),ig.MAX_GLYPHS=65535,ig.addDynamicAttributes=J_;const ng=new ps({"symbol-placement":new ls(De.layout_symbol["symbol-placement"]),"symbol-spacing":new ls(De.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ls(De.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new hs(De.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ls(De.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ls(De.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ls(De.layout_symbol["icon-ignore-placement"]),"icon-optional":new ls(De.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ls(De.layout_symbol["icon-rotation-alignment"]),"icon-size":new hs(De.layout_symbol["icon-size"]),"icon-text-fit":new ls(De.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ls(De.layout_symbol["icon-text-fit-padding"]),"icon-image":new hs(De.layout_symbol["icon-image"]),"icon-rotate":new hs(De.layout_symbol["icon-rotate"]),"icon-padding":new ls(De.layout_symbol["icon-padding"]),"icon-keep-upright":new ls(De.layout_symbol["icon-keep-upright"]),"icon-offset":new hs(De.layout_symbol["icon-offset"]),"icon-anchor":new hs(De.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ls(De.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ls(De.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ls(De.layout_symbol["text-rotation-alignment"]),"text-field":new hs(De.layout_symbol["text-field"]),"text-font":new hs(De.layout_symbol["text-font"]),"text-size":new hs(De.layout_symbol["text-size"]),"text-max-width":new hs(De.layout_symbol["text-max-width"]),"text-line-height":new hs(De.layout_symbol["text-line-height"]),"text-letter-spacing":new hs(De.layout_symbol["text-letter-spacing"]),"text-justify":new hs(De.layout_symbol["text-justify"]),"text-radial-offset":new hs(De.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ls(De.layout_symbol["text-variable-anchor"]),"text-anchor":new hs(De.layout_symbol["text-anchor"]),"text-max-angle":new ls(De.layout_symbol["text-max-angle"]),"text-writing-mode":new ls(De.layout_symbol["text-writing-mode"]),"text-rotate":new hs(De.layout_symbol["text-rotate"]),"text-padding":new ls(De.layout_symbol["text-padding"]),"text-keep-upright":new ls(De.layout_symbol["text-keep-upright"]),"text-transform":new hs(De.layout_symbol["text-transform"]),"text-offset":new hs(De.layout_symbol["text-offset"]),"text-allow-overlap":new ls(De.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ls(De.layout_symbol["text-ignore-placement"]),"text-optional":new ls(De.layout_symbol["text-optional"])}),og=new ps({"icon-opacity":new hs(De.paint_symbol["icon-opacity"]),"icon-color":new hs(De.paint_symbol["icon-color"]),"icon-halo-color":new hs(De.paint_symbol["icon-halo-color"]),"icon-halo-width":new hs(De.paint_symbol["icon-halo-width"]),"icon-halo-blur":new hs(De.paint_symbol["icon-halo-blur"]),"icon-translate":new ls(De.paint_symbol["icon-translate"]),"icon-translate-anchor":new ls(De.paint_symbol["icon-translate-anchor"]),"text-opacity":new hs(De.paint_symbol["text-opacity"]),"text-color":new hs(De.paint_symbol["text-color"],{runtimeType:Ze,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new hs(De.paint_symbol["text-halo-color"]),"text-halo-width":new hs(De.paint_symbol["text-halo-width"]),"text-halo-blur":new hs(De.paint_symbol["text-halo-blur"]),"text-translate":new ls(De.paint_symbol["text-translate"]),"text-translate-anchor":new ls(De.paint_symbol["text-translate-anchor"])});var ag={paint:og,layout:ng};class sg{constructor(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ve,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ba(sg,"FormatSectionOverride",{omit:["defaultValue"]});class lg extends Xl{constructor(t){super(t,ag)}recalculate(t,e){super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const i=this.layout.get("text-writing-mode");if(i){const t=[];for(const e of i)t.indexOf(e)<0&&t.push(e);this.layout._values["text-writing-mode"]=t}else"point"===this.layout.get("symbol-placement")?this.layout._values["text-writing-mode"]=["horizontal"]:this.layout._values["text-writing-mode"]=["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(t,e,i,r){const n=this.layout.get(t).evaluate(e,{},i,r),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||ro(o.value)||!n?n:rg(e.properties,n)}createBucket(t){return new ig(t)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const t of ag.paint.overridableProperties){if(!lg.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),i=new sg(e),r=new io(i,e.property.specification);let n=null;n="constant"===e.value.kind||"source"===e.value.kind?new oo("source",r):new ao("composite",r,e.value.zoomStops,e.value._interpolationType),this.paint._values[t]=new as(e.property,n,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&lg.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const i=t.get("text-field"),r=ag.paint.properties[e];let n=!1;const o=t=>{for(const e of t)if(r.overrides&&r.overrides.hasOverride(e))return void(n=!0)};if("constant"===i.value.kind&&i.value.value instanceof ui)o(i.value.value.sections);else if("source"===i.value.kind){const t=e=>{if(!n)if(e instanceof gi&&mi(e.value)===Ke){const t=e.value;o(t.sections)}else e instanceof Mi?o(e.sections):e.eachChild(t)},e=i.value;e._styleExpression&&t(e._styleExpression.expression)}return n}getProgramConfiguration(t){return new jl(this,t)}}var hg={paint:new ps({"background-color":new ls(De.paint_background["background-color"]),"background-pattern":new us(De.paint_background["background-pattern"]),"background-opacity":new ls(De.paint_background["background-opacity"])})};class cg extends Xl{constructor(t){super(t,hg)}getProgramIds(){return[this.paint.get("background-pattern")?"backgroundPattern":"background"]}}var ug={paint:new ps({"raster-opacity":new ls(De.paint_raster["raster-opacity"]),"raster-hue-rotate":new ls(De.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ls(De.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ls(De.paint_raster["raster-brightness-max"]),"raster-saturation":new ls(De.paint_raster["raster-saturation"]),"raster-contrast":new ls(De.paint_raster["raster-contrast"]),"raster-resampling":new ls(De.paint_raster["raster-resampling"]),"raster-fade-duration":new ls(De.paint_raster["raster-fade-duration"])})};class dg extends Xl{constructor(t){super(t,ug)}getProgramIds(){return["raster"]}}function pg(t){const e=[],i=t.id;return void 0===i&&e.push({message:`layers.${i}: missing required property "id"`}),void 0===t.render&&e.push({message:`layers.${i}: missing required method "render"`}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:`layers.${i}: property "renderingMode" must be either "2d" or "3d"`}),e}class fg extends Xl{constructor(t){super(t,{}),this.implementation=t}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)}onRemove(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)}}var mg={paint:new ps({"sky-type":new ls(De.paint_sky["sky-type"]),"sky-atmosphere-sun":new ls(De.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new ls(De.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new ls(De.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new ls(De.paint_sky["sky-gradient-radius"]),"sky-gradient":new ds(De.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new ls(De.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new ls(De.paint_sky["sky-atmosphere-color"]),"sky-opacity":new ls(De.paint_sky["sky-opacity"])})};function vg(t,e,i){const r=[0,0,1],n=eu([]);return ru(n,n,i?-l(t)+Math.PI:l(t)),iu(n,n,-l(e)),Fc(r,r,n),Lc(r,r)}class _g extends Xl{constructor(t){super(t,mg),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"sky-gradient"===t?this._updateColorRamp():"sky-atmosphere-sun"!==t&&"sky-atmosphere-halo-color"!==t&&"sky-atmosphere-color"!==t&&"sky-atmosphere-sun-intensity"!==t||(this._skyboxInvalidated=!0)}_updateColorRamp(){const t=this._transitionablePaint._values["sky-gradient"].value.expression;this.colorRamp=Eu({expression:t,evaluationKey:"skyRadialProgress"}),this.colorRampTexture&&(this.colorRampTexture.destroy(),this.colorRampTexture=null)}needsSkyboxCapture(t){if(this._skyboxInvalidated||!this.skyboxTexture||!this.skyboxGeometry)return!0;if(!this.paint.get("sky-atmosphere-sun")){const e=t.style.light.properties.get("position");return this._lightPosition.azimuthal!==e.azimuthal||this._lightPosition.polar!==e.polar}return!1}getCenter(t,e){if("atmosphere"===this.paint.get("sky-type")){const i=this.paint.get("sky-atmosphere-sun"),r=!i,n=t.style.light,o=n.properties.get("position");return r&&"viewport"===n.properties.get("anchor")&&V("The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly."),r?vg(o.azimuthal,90-o.polar,e):vg(i[0],90-i[1],e)}const i=this.paint.get("sky-gradient-center");return vg(i[0],90-i[1],e)}is3D(){return!1}isSky(){return!0}markSkyboxValid(t){this._skyboxInvalidated=!1,this._lightPosition=t.style.light.properties.get("position")}hasOffscreenPass(){return!0}getProgramIds(){const t=this.paint.get("sky-type");return"atmosphere"===t?["skyboxCapture","skybox"]:"gradient"===t?["skyboxGradient"]:null}}const gg={circle:pu,heatmap:Au,hillshade:Su,fill:Ed,"fill-extrusion":vp,line:Hp,symbol:lg,background:cg,raster:dg,sky:_g};function yg(t){return"custom"===t.type?new fg(t):new gg[t.type](t)}class xg{constructor(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,r)}update(t,i,r){const{width:n,height:o}=t,{context:a}=this,{gl:s}=a,{HTMLImageElement:l,HTMLCanvasElement:h,HTMLVideoElement:c,ImageData:u,ImageBitmap:d}=e;if(s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!i||!1!==i.premultiply)),r||this.size&&this.size[0]===n&&this.size[1]===o){const{x:e,y:i}=r||{x:0,y:0};t instanceof l||t instanceof h||t instanceof c||t instanceof u||d&&t instanceof d?s.texSubImage2D(s.TEXTURE_2D,0,e,i,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,e,i,n,o,s.RGBA,s.UNSIGNED_BYTE,t.data)}else this.size=[n,o],t instanceof l||t instanceof h||t instanceof c||t instanceof u||d&&t instanceof d?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,n,o,0,this.format,s.UNSIGNED_BYTE,t.data);this.useMipmap=Boolean(i&&i.useMipmap&&this.isSizePowerOfTwo()),this.useMipmap&&s.generateMipmap(s.TEXTURE_2D)}bind(t,e){const{context:i}=this,{gl:r}=i;r.bindTexture(r.TEXTURE_2D,this.texture),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.useMipmap?t===r.NEAREST?r.NEAREST_MIPMAP_NEAREST:r.LINEAR_MIPMAP_NEAREST:t),this.filter=t),e!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,e),this.wrap=e)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}class bg{constructor(t,e){this.width=t,this.height=e,this.nextRow=0,this.image=new zu({width:t,height:e}),this.positions={},this.uploaded=!1}getDash(t,e){const i=this.getKey(t,e);return this.positions[i]}trim(){const t=this.width,e=this.height=P(this.nextRow);this.image.resize({width:t,height:e})}getKey(t,e){return t.join(",")+e}getDashRanges(t,e,i){const r=[];let n=t.length%2==1?-t[t.length-1]*i:0,o=t[0]*i,a=!0;r.push({left:n,right:o,isDash:a,zeroLength:0===t[0]});let s=t[0];for(let e=1;e1&&(s=t[++a]);const l=Math.abs(n-s.left),h=Math.abs(n-s.right),c=Math.min(l,h);let u;const d=e/i*(r+1);if(s.isDash){const t=r-Math.abs(d);u=Math.sqrt(c*c+t*t)}else u=r-Math.sqrt(c*c+d*d);this.image.data[o+n]=Math.max(0,Math.min(255,u+128))}}}addRegularDash(t,e){for(let e=t.length-1;e>=0;--e){const i=t[e],r=t[e+1];i.zeroLength?t.splice(e,1):r&&r.isDash===i.isDash&&(r.left=i.left,t.splice(e,1))}const i=t[0],r=t[t.length-1];i.isDash===r.isDash&&(i.left=r.left-this.width,r.right=i.right+this.width);const n=this.width*this.nextRow;let o=0,a=t[o];for(let i=0;i1&&(a=t[++o]);const r=Math.abs(i-a.left),s=Math.abs(i-a.right),l=Math.min(r,s),h=(a.isDash?l:-l)+e;this.image.data[n+i]=Math.max(0,Math.min(255,h+128))}}addDash(t,e){const i=this.getKey(t,e);if(this.positions[i])return this.positions[i];const r="round"===e,n=r?7:0,o=2*n+1;if(this.nextRow+o>this.height)return V("LineAtlas out of space"),null;0===t.length&&t.push(1);let a=0;for(let e=0;e{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))}remove(){this._channel=void 0,this._callback=()=>{}}}class zg{constructor(){this.tasks={},this.taskQueue=[],D(["process"],this),this.invoker=new wg(this.process),this.nextId=0}add(t,e){const i=this.nextId++,r=Mg(e);if(0===r){q();try{t()}finally{}return{cancel:()=>{}}}return this.tasks[i]={fn:t,metadata:e,priority:r,id:i},this.taskQueue.push(i),this.invoker.trigger(),{cancel:()=>{delete this.tasks[i]}}}process(){q();try{if(this.taskQueue=this.taskQueue.filter((t=>!!this.tasks[t])),!this.taskQueue.length)return;const t=this.pick();if(null===t)return;const e=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),!e)return;e.fn()}finally{}}pick(){let t=null,e=1/0;for(let i=0;i
${this.errorMessage}
0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:i}=this,r=e[t];for(;t>0;){const n=t-1>>1,o=e[n];if(i(r,o)>=0)break;e[t]=o,t=n}e[t]=r}_down(t){const{data:e,compare:i}=this,r=this.length>>1,n=e[t];for(;t=0)break;e[t]=o,t=r}e[t]=n}}function ev(t,e){return te?1:0}function iv(t,e=1,i=!1){let r=1/0,o=1/0,a=-1/0,s=-1/0;const l=t[0];for(let t=0;ta)&&(a=e.x),(!t||e.y>s)&&(s=e.y)}const h=a-r,c=s-o,u=Math.min(h,c);let d=u/2;const p=new tv([],rv);if(0===u)return new n(r,o);for(let e=r;ef.d||!f.d)&&(f=r,i&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,m)),r.max-f.d<=e||(d=r.h/2,p.push(new nv(r.p.x-d,r.p.y-d,d,t)),p.push(new nv(r.p.x+d,r.p.y-d,d,t)),p.push(new nv(r.p.x-d,r.p.y+d,d,t)),p.push(new nv(r.p.x+d,r.p.y+d,d,t)),m+=4)}return i&&(console.log(`num probes: ${m}`),console.log(`best distance: ${f.d}`)),f.p}function rv(t,e){return e.max-t.max}function nv(t,e,i,r){this.p=new n(t,e),this.h=i,this.d=ov(this.p,r),this.max=this.d+this.h*Math.SQRT2}function ov(t,e){let i=!1,r=1/0;for(let n=0;nt.y!=s.y>t.y&&t.x<(s.x-n.x)*(t.y-n.y)/(s.y-n.y)+n.x&&(i=!i),r=Math.min(r,Oh(t,n,s))}}return(i?1:-1)*Math.sqrt(r)}function av(t){let e=0,i=0,r=0;const n=t[0];for(let t=0,o=n.length,a=o-1;tt*nf))}let y=f?"center":u.get("text-justify").evaluate(o,{},s);const b=u.get("symbol-placement"),w="point"===b,z="point"===b?u.get("text-max-width").evaluate(o,{},s)*nf:0,M=o=>{t.allowVerticalPlacement&&Ca(r)&&(_.vertical=dm(g,e,i,n,l,z,h,m,o,p,x,nm.vertical,!0,b,d,c))};if(!f&&v){const t="auto"===y?v.map((t=>dv(t))):[y];let r=!1;for(let o=0;o=0||!Ca(r)){const t=dm(g,e,i,n,l,z,h,m,y,p,x,nm.horizontal,!1,b,d,c);t&&(_.horizontal[y]=t)}M("point"===b?"left":y)}}let b=!1;if(o.icon&&o.icon.name){const e=r[o.icon.name];e&&(y=Em(n[o.icon.name],u.get("icon-offset").evaluate(o,{},s),u.get("icon-anchor").evaluate(o,{},s)),b=e.sdf,void 0===t.sdfIcons?t.sdfIcons=e.sdf:t.sdfIcons!==e.sdf&&V("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(e.pixelRatio!==t.pixelRatio||0!==u.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}const w=gv(_.horizontal)||_.vertical;t.iconsInText||(t.iconsInText=!!w&&w.iconsInText),(w||y)&&fv(t,o,_,y,r,p,d,v,x,b,a,s,h)}o&&t.generateCollisionDebugBuffers(l,t.collisionBoxArray)}function dv(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function pv(t,e){e>18&&t>2&&(t>>=1);const i=Ql/(512*t);return Math.max(i,1)}function fv(t,e,i,r,n,o,a,s,h,c,u,d,p){let f=o.textMaxSize.evaluate(e,{},d);void 0===f&&(f=a);const m=t.layers[0].layout,v=m.get("icon-offset").evaluate(e,{},d),_=gv(i.horizontal)||i.vertical,g="globe"===p.name,y=nf,x=a/y,b=t.tilePixelRatio*f/y,w=t.tilePixelRatio*s,z=pv(t.overscaling,t.zoom)*m.get("symbol-spacing"),M=m.get("text-padding")*t.tilePixelRatio,T=m.get("icon-padding")*t.tilePixelRatio,E=l(m.get("text-max-angle")),A="map"===m.get("text-rotation-alignment")&&"point"!==m.get("symbol-placement"),C="map"===m.get("icon-rotation-alignment")&&"point"!==m.get("symbol-placement"),S=m.get("symbol-placement"),I=z/2,P=m.get("icon-text-fit");let k;r&&"none"!==P&&(t.allowVerticalPlacement&&i.vertical&&(k=Am(r,i.vertical,P,m.get("icon-text-fit-padding"),v,x)),_&&(r=Am(r,_,P,m.get("icon-text-fit-padding"),v,x)));const L=(a,s,l)=>{if(s.x<0||s.x>=Ql||s.y<0||s.y>=Ql)return;let f=null;if(g){const{x:t,y:e,z:i}=p.projectTilePoint(s.x,s.y,l);f={anchor:new Cm(t,e,i,0,void 0),up:p.upVector(l,s.x,s.y)}}bv(t,s,f,a,i,r,n,k,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,M,A,h,w,T,C,v,e,o,c,u,d)};if("line"===S)for(const n of Om(e.geometry,0,0,Ql,Ql)){const e=Dm(n,z,E,i.vertical||_,r,y,b,t.overscaling,Ql);for(const i of e){const e=_;e&&wv(t,e.text,I,i)||L(n,i,d)}}else if("line-center"===S){for(const t of e.geometry)if(t.length>1){const e=Lm(t,E,i.vertical||_,r,y,b);e&&L(t,e,d)}}else if("Polygon"===e.type)for(const t of gd(e.geometry,0)){const e=iv(t,16);L(t[0],new Cm(e.x,e.y,0,0,void 0),d)}else if("LineString"===e.type)for(const t of e.geometry)L(t,new Cm(t[0].x,t[0].y,0,0,void 0),d);else if("Point"===e.type)for(const t of e.geometry)for(const e of t)L([e],new Cm(e.x,e.y,0,0,void 0),d)}const mv=255,vv=mv*of;function _v(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v){const _=Qm(i,r,l,o,a,s,n,t.allowVerticalPlacement),g=t.textSizeData;let y=null;"source"===g.kind?(y=[of*o.layout.get("text-size").evaluate(s,{},v)],y[0]>vv&&V(`${t.layerIds[0]}: Value for "text-size" is >= ${mv}. Reduce your "text-size".`)):"composite"===g.kind&&(y=[of*f.compositeTextSizes[0].evaluate(s,{},v),of*f.compositeTextSizes[1].evaluate(s,{},v)],(y[0]>vv||y[1]>vv)&&V(`${t.layerIds[0]}: Value for "text-size" is >= ${mv}. Reduce your "text-size".`)),t.addSymbols(t.text,_,y,l,a,s,c,e,i,h.lineStartIndex,h.lineLength,p,m,v);for(const e of u)d[e]=t.text.placedSymbolArray.length-1;return 4*_.length}function gv(t){for(const e in t)return t[e];return null}function yv(t,e,i,r,o,a,s,h,c,u){let d=s.top,p=s.bottom,f=s.left,m=s.right;const v=s.collisionPadding;if(v&&(f-=v[0],d-=v[1],m+=v[2],p+=v[3]),c){const t=new n(f,d),e=new n(m,d),i=new n(f,p),r=new n(m,p),o=l(c);let a=new n(0,0);u&&(a=new n(u[0],u[1])),t._rotateAround(o,a),e._rotateAround(o,a),i._rotateAround(o,a),r._rotateAround(o,a),f=Math.min(t.x,e.x,i.x,r.x),m=Math.max(t.x,e.x,i.x,r.x),d=Math.min(t.y,e.y,i.y,r.y),p=Math.max(t.y,e.y,i.y,r.y)}return t.emplaceBack(e.x,e.y,e.z,i.x,i.y,f,d,m,p,h,r,o,a),t.length-1}function xv(t){t.collisionPadding&&(t.top-=t.collisionPadding[1],t.bottom+=t.collisionPadding[3]);const e=t.bottom-t.top;return e>0?Math.max(10,e):null}function bv(t,e,i,r,n,o,a,s,l,h,c,u,d,p,f,m,v,_,g,y,x,b,w,z,M){const T=t.addToLineVertexArray(e,r);let E,A,C,S,I,P,k,L=0,D=0,R=0,O=0,B=-1,F=-1;const N={};let U=ml("");const j=i?i.anchor:e;let $=0,G=0;if(void 0===l._unevaluatedLayout.getValue("text-radial-offset")?[$,G]=l.layout.get("text-offset").evaluate(x,{},M).map((t=>t*nf)):($=l.layout.get("text-radial-offset").evaluate(x,{},M)*nf,G=lv),t.allowVerticalPlacement&&n.vertical){const t=n.vertical;if(f)P=xv(t),s&&(k=xv(s));else{const i=l.layout.get("text-rotate").evaluate(x,{},M)+90;C=yv(h,j,e,c,u,d,t,p,i,m),s&&(S=yv(h,j,e,c,u,d,s,_,i))}}if(o){const r=l.layout.get("icon-rotate").evaluate(x,{},M),n="none"!==l.layout.get("icon-text-fit"),a=Zm(o,r,w,n),p=s?Zm(s,r,w,n):void 0;A=yv(h,j,e,c,u,d,o,_,r),L=4*a.length;const f=t.iconSizeData;let m=null;"source"===f.kind?(m=[of*l.layout.get("icon-size").evaluate(x,{},M)],m[0]>vv&&V(`${t.layerIds[0]}: Value for "icon-size" is >= ${mv}. Reduce your "icon-size".`)):"composite"===f.kind&&(m=[of*b.compositeIconSizes[0].evaluate(x,{},M),of*b.compositeIconSizes[1].evaluate(x,{},M)],(m[0]>vv||m[1]>vv)&&V(`${t.layerIds[0]}: Value for "icon-size" is >= ${mv}. Reduce your "icon-size".`)),t.addSymbols(t.icon,a,m,y,g,x,!1,i,e,T.lineStartIndex,T.lineLength,-1,z,M),B=t.icon.placedSymbolArray.length-1,p&&(D=4*p.length,t.addSymbols(t.icon,p,m,y,g,x,nm.vertical,i,e,T.lineStartIndex,T.lineLength,-1,z,M),F=t.icon.placedSymbolArray.length-1)}for(const r in n.horizontal){const o=n.horizontal[r];E||(U=ml(o.text),f?I=xv(o):E=yv(h,j,e,c,u,d,o,p,l.layout.get("text-rotate").evaluate(x,{},M),m));const s=1===o.positionedLines.length;if(R+=_v(t,i,e,o,a,l,f,x,m,T,n.vertical?nm.horizontal:nm.horizontalOnly,s?Object.keys(n.horizontal):[r],N,B,b,z,M),s)break}n.vertical&&(O+=_v(t,i,e,n.vertical,a,l,f,x,m,T,nm.vertical,["vertical"],N,F,b,z,M));let q=-1;const Z=(t,e)=>t?Math.max(t,e):e;q=Z(I,q),q=Z(P,q),q=Z(k,q);const H=q>-1?1:0;t.glyphOffsetArray.length>=ig.MAX_GLYPHS&&V("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey);const W=j;t.symbolInstances.emplaceBack(W.x,W.y,W.z,e.x,e.y,N.right>=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical>=0?N.vertical:-1,B,F,U,void 0!==E?E:t.collisionBoxArray.length,void 0!==E?E+1:t.collisionBoxArray.length,void 0!==C?C:t.collisionBoxArray.length,void 0!==C?C+1:t.collisionBoxArray.length,void 0!==A?A:t.collisionBoxArray.length,void 0!==A?A+1:t.collisionBoxArray.length,S||t.collisionBoxArray.length,S?S+1:t.collisionBoxArray.length,c,R,O,L,D,H,0,$,G,q)}function wv(t,e,i,r){const n=t.compareText;if(e in n){const t=n[e];for(let e=t.length-1;e>=0;e--)if(r.dist(t[e])1?null:$v(t.a[e],t.b[e],t.angle,y(i,0,1))+t.center[e]}function qv(t){if(t.z<=1)return Uv[t.z+2*t.y+t.x];const[e,i]=Hv(t),r=[Xv(e[0],e[1]),Xv(e[0],i[1]),Xv(i[0],e[1]),Xv(i[0],i[1])],n=[Nv,Nv,Nv],o=[Fv,Fv,Fv];for(const t of r)n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),o[0]=Math.max(o[0],t[0]),o[1]=Math.max(o[1],t[1]),o[2]=Math.max(o[2],t[2]);return new du(n,o)}function Zv(t,e,i){const r=e/t.worldSize,n=Number.MAX_VALUE,o=[-n,-n,-n],a=[n,n,n],s=rc(new Float64Array(16));if(sc(s,s,[r,r,r]),oc(s,s,t.globeMatrix),i.z<=1){const t=qv(i).getCorners();for(let e=0;e.5?z-=1:z<-.5&&(z+=1),Math.abs(z)>Math.abs(M))w=z>=0?1:3,b=p;else{w=M>=0?0:2;const t=[s[4],s[5],s[6]];let e;e=M>=0?-Math.sin(l(u.getSouth()))*kv:-Math.sin(l(u.getNorth()))*kv,b=Ic(b,p,t,e)}const T=d[w],E=d[(w+1)%4],A=new Vv(T,E,b),C=[Gv(A,0)||T[0],Gv(A,1)||T[1],Gv(A,2)||T[2]];return a[2]=Math.min(T[2],E[2]),Ac(a,a,C),Cc(o,o,C),new du(a,o)}function Hv(t){const e=1<0;return 0===r&&!n&&!a&&o}function c_(t,e,i){const[r,n]=e,o=1/Rv,a=(n[1]-r[1])*o,s=Ov[i],l=(n[0]-r[0])/s;return[0,a,1<Math.PI/2*1.01}const v_=l(85),__=Math.cos(v_),g_=Math.sin(v_);class y_{constructor(t){this._createGrid(t),this._createPoles(t)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(const t of this._poleSegments)t.destroy();for(const t of this._gridSegments)t.destroy();if(this._wireframeIndexBuffer){this._wireframeIndexBuffer.destroy();for(const t of this._wireframeSegments)t.destroy()}}_createGrid(t){const e=new zs,i=new Ns,r=Rv,n=r+1;for(let t=0;ty&&(x(t,h,r,n,s,l),x(h,i,s,l,o,a))}x(u,d,r,o,n,o),x(d,p,n,o,n,a),x(p,f,n,a,r,a),x(f,u,r,a,r,o),m-=y,v-=y,_+=y,g+=y;const b=1/Math.max(_-m,g-v);return{scale:b,x:m*b,y:v*b,x2:_*b,y2:g*b,projection:e}}function z_(t,e,i,r,n,o,a,s,l){if("globe"===l.name)return Zv(t,e,new up(i,r,n));const h=w_({z:i,x:r,y:n},l),c=h.x/h.scale,u=h.y/h.scale,d=h.x2/h.scale,p=h.y2/h.scale;return new du([(o+c)*e,e*u,a],[(o+d)*e,e*p,s])}function M_(t,{x:e,y:i},r=0){return new n(((e-r)*t.scale-t.x)*Ql,(i*t.scale-t.y)*Ql)}function T_(t,e,i=0){return wc(((e.x-i)*t.scale-t.x)*Ql,(e.y*t.scale-t.y)*Ql,ch(e.z,e.y))}const E_=rc(new Float32Array(16));class A_{constructor(t){this.spec=t,this.name=t.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(t,e){return{x:0,y:0,z:0}}unproject(t,e){return new ih(0,0)}projectTilePoint(t,e,i){return{x:t,y:e,z:0}}locationPoint(t,e,i=!0){return t._coordinatePoint(t.locationCoordinate(e),i)}pixelsPerMeter(t,e){return sh(1,t)*e}pixelSpaceConversion(t,e,i){return 1}farthestPixelDistance(t){return x_(t,t.pixelsPerMeter)}pointCoordinate(t,e,i,r){const o=t.horizonLineFromTop(!1),a=new n(e,Math.max(o,i));return t.rayIntersectionCoordinate(t.pointRayIntersection(a,r))}pointCoordinate3D(t,e,i){const r=new n(e,i);if(t.elevation)return t.elevation.pointCoordinate(r);{const e=this.pointCoordinate(t,r.x,r.y,0);return[e.x,e.y,e.z]}}isPointAboveHorizon(t,e){if(t.elevation)return!this.pointCoordinate3D(t,e.x,e.y);const i=t.horizonLineFromTop();return e.y0?e<-O_+i&&(e=-O_+i):e>O_-i&&(e=O_-i);const o=n/Math.pow(B_(e),r),a=o*Math.sin(r*t),s=n-o*Math.cos(r*t);return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+.5),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI,e=(2*(1-e)-.5)*Math.PI;const{n:i,f:r}=this,n=r-e,o=Math.sign(n),a=Math.sign(i)*Math.sqrt(t*t+n*n);let s=Math.atan2(t,Math.abs(n))*o;n*i<0&&(s-=Math.PI*Math.sign(t)*o);const l=y(h(s/i)+this.center[0],-180,180),c=y(h(2*Math.atan(Math.pow(r/a,1/i))-O_),-uh,uh);return new ih(l,c)}}class N_ extends A_{constructor(t){super(t),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(t,e){return{x:oh(t),y:ah(e),z:0}}unproject(t,e){const i=lh(t),r=hh(e);return new ih(i,r)}}const U_=l(uh);class j_ extends A_{project(t,e){const i=(e=l(e))*e,r=i*i,n=e*(1.007226+i*(.015085+r*(.028874*i-.044475-.005916*r)));return{x:.5*((t=l(t))*(.8707-.131979*i+r*(r*(.003971*i-.001529*r)-.013791))/Math.PI+.5),y:1-.5*(n/Math.PI+1),z:0}}unproject(t,e){t=(2*t-.5)*Math.PI;const i=1e-6;let r=e=(2*(1-e)-1)*Math.PI,n=25,o=0,a=r*r;do{a=r*r;const t=a*a;o=(r*(1.007226+a*(.015085+t*(.028874*a-.044475-.005916*t)))-e)/(1.007226+a*(.045255+t*(.259866*a-.311325-.005916*11*t))),r=y(r-o,-U_,U_)}while(Math.abs(o)>i&&--n>0);a=r*r;const s=y(h(t/(.8707+a*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979))),-180,180),l=h(r);return new ih(s,l)}}const V_=l(uh);class $_ extends A_{project(t,e){e=l(e),t=l(t);const i=Math.cos(e),r=2/Math.PI,n=Math.acos(i*Math.cos(t/2)),o=Math.sin(n)/n,a=.5*(t*r+2*i*Math.sin(t/2)/o)||0,s=.5*(e+Math.sin(e)/o)||0;return{x:.5*(a/Math.PI+.5),y:1-.5*(s/Math.PI+1),z:0}}unproject(t,e){let i=t=(2*t-.5)*Math.PI,r=e=(2*(1-e)-1)*Math.PI,n=25;const o=1e-6;let a=0,s=0;do{const n=Math.cos(r),o=Math.sin(r),l=2*o*n,h=o*o,c=n*n,u=Math.cos(i/2),d=Math.sin(i/2),p=2*u*d,f=d*d,m=1-c*u*u,v=m?1/m:0,_=m?Math.acos(n*u)*Math.sqrt(1/m):0,g=.5*(2*_*n*d+2*i/Math.PI)-t,x=.5*(_*o+r)-e,b=.5*v*(c*f+_*n*u*h)+1/Math.PI,w=v*(p*l/4-_*o*d),z=.125*v*(l*d-_*o*c*p),M=.5*v*(h*u+_*f*n)+.5,T=w*z-M*b;a=(x*w-g*M)/T,s=(g*z-x*b)/T,i=y(i-a,-Math.PI,Math.PI),r=y(r-s,-V_,V_)}while((Math.abs(a)>o||Math.abs(s)>o)&&--n>0);return new ih(h(i),h(r))}}class G_ extends A_{constructor(t){super(t),this.center=t.center||[0,0],this.parallels=t.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(l(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(t,e){const{scale:i,cosPhi:r}=this;return{x:l(t)*r*i+.5,y:-Math.sin(l(e))/r*i+.5,z:0}}unproject(t,e){const{scale:i,cosPhi:r}=this,n=-(e-.5)/i,o=y(h((t-.5)/i)/r,-180,180),a=n*r,s=Math.asin(y(a,-1,1)),l=y(h(s),-uh,uh);return new ih(o,l)}}class q_ extends N_{constructor(t){super(t),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug","custom"],this.range=[3,5]}projectTilePoint(t,e,i){const r=Math.pow(2,i.z),n=(t/Ql+i.x)/r,o=Xv(hh((e/Ql+i.y)/r),lh(n));return Oc(o,o,Qv(qv(i))),{x:o[0],y:o[1],z:o[2]}}locationPoint(t,e){const i=Xv(e.lat,e.lng),r=Lc([],i),o=t.elevation?t.elevation.getAtPointOrZero(t.locationCoordinate(e),t._centerAltitude):t._centerAltitude;Ic(i,i,r,sh(1,0)*Ql*o);const a=rc(new Float64Array(16));return oc(a,t.pixelMatrix,t.globeMatrix),Oc(i,i,a),new n(i[0],i[1])}pixelsPerMeter(t,e){return sh(1,0)*e}pixelSpaceConversion(t,e,i){const r=yr(sh(1,Pv)*e,sh(1,t)*e,i);return this.pixelsPerMeter(t,e)/r}createTileMatrix(t,e,i){const r=t_(qv(i.canonical));return oc(new Float64Array(16),t.globeMatrix,r)}createInversionMatrix(t,e){const{center:i}=t,r=rc(new Float64Array(16));return oc(r,r,Qv(qv(e))),hc(r,r,l(i.lng)),lc(r,r,l(i.lat)),sc(r,r,[t._projectionScaler,t._projectionScaler,1]),Float32Array.from(r)}pointCoordinate(t,e,i,r){const n=jv(t,e,i,!0);return n||new ph(0,0)}pointCoordinate3D(t,e,i){const r=this.pointCoordinate(t,e,i,0);return[r.x,r.y,r.z]}isPointAboveHorizon(t,e){return!jv(t,e.x,e.y,!1)}farthestPixelDistance(t){const e=b_(t,this.pixelsPerMeter(t.center.lat,t.worldSize)),i=s_(t.zoom);if(i>0){const r=x_(t,sh(1,t.center.lat)*t.worldSize),n=t.worldSize/(2*Math.PI),o=Math.max(t.width,t.height)/t.worldSize*Math.PI;return yr(e,r+n*(1-Math.cos(o)),Math.pow(i,10))}return e}upVector(t,e,i){const r=1<0&&(this.globeExtVertexBuffer=t.createVertexBuffer(this.globeExtVertexArray,Kp.members,!0)),this.opacityVertexBuffer.itemSize=1),(i||r)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}ba(tg,"SymbolBuffers");class eg{constructor(t,e,i){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new i,this.segments=new Jl,this.collisionVertexArray=new Bs,this.collisionVertexArrayExt=new Fs}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Qp.members,!0),this.collisionVertexBufferExt=t.createVertexBuffer(this.collisionVertexArrayExt,tf.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}ba(eg,"CollisionBuffers");class ig{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((t=>t.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=rc([]),this.placementViewportMatrix=rc([]);const e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=af(this.zoom,e["text-size"]),this.iconSizeData=af(this.zoom,e["icon-size"]);const i=this.layers[0].layout,r=i.get("symbol-sort-key"),n=i.get("symbol-z-order");this.canOverlap=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==n&&void 0!==r.constantOr(1);const o="viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&this.canOverlap,this.writingModes=i.get("text-writing-mode").map((t=>nm[t])),this.stateDependentLayerIds=this.layers.filter((t=>t.isStateDependent())).map((t=>t.id)),this.sourceID=t.sourceID,this.projection=t.projection}createArrays(){this.text=new tg(new Vl(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new tg(new Vl(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new rl,this.lineVertexArray=new nl,this.symbolInstances=new il}calculateGlyphDependencies(t,e,i,r,n){for(let i=0;i0)&&("constant"!==s.value.kind||s.value.value.length>0),u="constant"!==h.value.kind||!!h.value.value||Object.keys(h.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!c&&!u)return;const p=e.iconDependencies,f=e.glyphDependencies,m=e.availableImages,v=new Qa(this.zoom);for(const{feature:e,id:l,index:h,sourceLayerIndex:_}of t){const t=n._featureFilter.needGeometry,g=Mh(e,t);if(!n._featureFilter.filter(v,g,i))continue;if(t||(g.geometry=zh(e,i,r)),a&&1!==e.type&&i.z<=5){const t=g.geometry,e=1<t),((t,i)=>Dc(Xv(hh((t.y/Ql+n)/e),lh((t.x/Ql+r)/e),1),Xv(hh((i.y/Ql+n)/e),lh((i.x/Ql+r)/e),1))=0;for(const i of y.sections)if(i.image)p[i.image.name]=!0;else{const r=Ca(y.toString()),n=i.fontStack||t,o=f[n]=f[n]||{};this.calculateGlyphDependencies(i.text,o,e,this.allowVerticalPlacement,r)}}}"line"===o.get("symbol-placement")&&(this.features=df(this.features)),this.sortFeaturesByKey&&this.features.sort(((t,e)=>t.sortKey-e.sortKey))}update(t,e,i,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,i,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,i,r))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=Z_(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,e){const i=this.lineVertexArray.length,r=t.segment;if(void 0!==r){let i=t.dist(e[r+1]),n=t.dist(e[r]);const o={};for(let t=r+1;t=0;t--)o[t]={x:e[t].x,y:e[t].y,tileUnitDistanceFromAnchor:n},t>0&&(n+=e[t-1].dist(e[t]));for(let t=0;t=0?e.rightJustifiedTextSymbolIndex:e.centerJustifiedTextSymbolIndex>=0?e.centerJustifiedTextSymbolIndex:e.leftJustifiedTextSymbolIndex>=0?e.leftJustifiedTextSymbolIndex:e.verticalPlacedTextSymbolIndex>=0?e.verticalPlacedTextSymbolIndex:r,o=this.text.placedSymbolArray.get(n),a=sf(this.textSizeData,t,o)/nf;return this.tilePixelRatio*a}getSymbolInstanceIconSize(t,e,i){const r=this.icon.placedSymbolArray.get(i),n=sf(this.iconSizeData,t,r);return this.tilePixelRatio*n}_commitDebugCollisionVertexUpdate(t,e,i){t.emplaceBack(e,-i,-i),t.emplaceBack(e,i,-i),t.emplaceBack(e,i,i),t.emplaceBack(e,-i,i)}_updateTextDebugCollisionBoxes(t,e,i,r,n,o){for(let a=r;a0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,e){const i=t.placedSymbolArray.get(e),r=i.vertexStartIndex+4*i.numGlyphs;for(let e=i.vertexStartIndex;er[t]-r[e]||n[e]-n[t])),o}addToSortKeyRanges(t,e){const i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===e?i.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const t of this.symbolInstanceIndexes){const e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach(((t,e,i)=>{t>=0&&i.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)})),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}function rg(t,e){return e.replace(/{([^{}]+)}/g,((e,i)=>i in t?String(t[i]):""))}ba(ig,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),ig.MAX_GLYPHS=65535,ig.addDynamicAttributes=J_;const ng=new ps({"symbol-placement":new ls(De.layout_symbol["symbol-placement"]),"symbol-spacing":new ls(De.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ls(De.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new hs(De.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ls(De.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ls(De.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ls(De.layout_symbol["icon-ignore-placement"]),"icon-optional":new ls(De.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ls(De.layout_symbol["icon-rotation-alignment"]),"icon-size":new hs(De.layout_symbol["icon-size"]),"icon-text-fit":new ls(De.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ls(De.layout_symbol["icon-text-fit-padding"]),"icon-image":new hs(De.layout_symbol["icon-image"]),"icon-rotate":new hs(De.layout_symbol["icon-rotate"]),"icon-padding":new ls(De.layout_symbol["icon-padding"]),"icon-keep-upright":new ls(De.layout_symbol["icon-keep-upright"]),"icon-offset":new hs(De.layout_symbol["icon-offset"]),"icon-anchor":new hs(De.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ls(De.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ls(De.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ls(De.layout_symbol["text-rotation-alignment"]),"text-field":new hs(De.layout_symbol["text-field"]),"text-font":new hs(De.layout_symbol["text-font"]),"text-size":new hs(De.layout_symbol["text-size"]),"text-max-width":new hs(De.layout_symbol["text-max-width"]),"text-line-height":new hs(De.layout_symbol["text-line-height"]),"text-letter-spacing":new hs(De.layout_symbol["text-letter-spacing"]),"text-justify":new hs(De.layout_symbol["text-justify"]),"text-radial-offset":new hs(De.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ls(De.layout_symbol["text-variable-anchor"]),"text-anchor":new hs(De.layout_symbol["text-anchor"]),"text-max-angle":new ls(De.layout_symbol["text-max-angle"]),"text-writing-mode":new ls(De.layout_symbol["text-writing-mode"]),"text-rotate":new hs(De.layout_symbol["text-rotate"]),"text-padding":new ls(De.layout_symbol["text-padding"]),"text-keep-upright":new ls(De.layout_symbol["text-keep-upright"]),"text-transform":new hs(De.layout_symbol["text-transform"]),"text-offset":new hs(De.layout_symbol["text-offset"]),"text-allow-overlap":new ls(De.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ls(De.layout_symbol["text-ignore-placement"]),"text-optional":new ls(De.layout_symbol["text-optional"])}),og=new ps({"icon-opacity":new hs(De.paint_symbol["icon-opacity"]),"icon-color":new hs(De.paint_symbol["icon-color"]),"icon-halo-color":new hs(De.paint_symbol["icon-halo-color"]),"icon-halo-width":new hs(De.paint_symbol["icon-halo-width"]),"icon-halo-blur":new hs(De.paint_symbol["icon-halo-blur"]),"icon-translate":new ls(De.paint_symbol["icon-translate"]),"icon-translate-anchor":new ls(De.paint_symbol["icon-translate-anchor"]),"text-opacity":new hs(De.paint_symbol["text-opacity"]),"text-color":new hs(De.paint_symbol["text-color"],{runtimeType:Ze,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new hs(De.paint_symbol["text-halo-color"]),"text-halo-width":new hs(De.paint_symbol["text-halo-width"]),"text-halo-blur":new hs(De.paint_symbol["text-halo-blur"]),"text-translate":new ls(De.paint_symbol["text-translate"]),"text-translate-anchor":new ls(De.paint_symbol["text-translate-anchor"])});var ag={paint:og,layout:ng};class sg{constructor(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ve,this.defaultValue=t}evaluate(t){if(t.formattedSection){const e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ba(sg,"FormatSectionOverride",{omit:["defaultValue"]});class lg extends Xl{constructor(t){super(t,ag)}recalculate(t,e){super.recalculate(t,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const i=this.layout.get("text-writing-mode");if(i){const t=[];for(const e of i)t.indexOf(e)<0&&t.push(e);this.layout._values["text-writing-mode"]=t}else"point"===this.layout.get("symbol-placement")?this.layout._values["text-writing-mode"]=["horizontal"]:this.layout._values["text-writing-mode"]=["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(t,e,i,r){const n=this.layout.get(t).evaluate(e,{},i,r),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||ro(o.value)||!n?n:rg(e.properties,n)}createBucket(t){return new ig(t)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const t of ag.paint.overridableProperties){if(!lg.hasPaintOverride(this.layout,t))continue;const e=this.paint.get(t),i=new sg(e),r=new io(i,e.property.specification);let n=null;n="constant"===e.value.kind||"source"===e.value.kind?new oo("source",r):new ao("composite",r,e.value.zoomStops,e.value._interpolationType),this.paint._values[t]=new as(e.property,n,e.parameters)}}_handleOverridablePaintPropertyUpdate(t,e,i){return!(!this.layout||e.isDataDriven()||i.isDataDriven())&&lg.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,e){const i=t.get("text-field"),r=ag.paint.properties[e];let n=!1;const o=t=>{for(const e of t)if(r.overrides&&r.overrides.hasOverride(e))return void(n=!0)};if("constant"===i.value.kind&&i.value.value instanceof ui)o(i.value.value.sections);else if("source"===i.value.kind){const t=e=>{if(!n)if(e instanceof gi&&mi(e.value)===Ke){const t=e.value;o(t.sections)}else e instanceof Mi?o(e.sections):e.eachChild(t)},e=i.value;e._styleExpression&&t(e._styleExpression.expression)}return n}getProgramConfiguration(t){return new jl(this,t)}}var hg={paint:new ps({"background-color":new ls(De.paint_background["background-color"]),"background-pattern":new us(De.paint_background["background-pattern"]),"background-opacity":new ls(De.paint_background["background-opacity"])})};class cg extends Xl{constructor(t){super(t,hg)}getProgramIds(){return[this.paint.get("background-pattern")?"backgroundPattern":"background"]}}var ug={paint:new ps({"raster-opacity":new ls(De.paint_raster["raster-opacity"]),"raster-hue-rotate":new ls(De.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ls(De.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ls(De.paint_raster["raster-brightness-max"]),"raster-saturation":new ls(De.paint_raster["raster-saturation"]),"raster-contrast":new ls(De.paint_raster["raster-contrast"]),"raster-resampling":new ls(De.paint_raster["raster-resampling"]),"raster-fade-duration":new ls(De.paint_raster["raster-fade-duration"])})};class dg extends Xl{constructor(t){super(t,ug)}getProgramIds(){return["raster"]}}function pg(t){const e=[],i=t.id;return void 0===i&&e.push({message:`layers.${i}: missing required property "id"`}),void 0===t.render&&e.push({message:`layers.${i}: missing required method "render"`}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:`layers.${i}: property "renderingMode" must be either "2d" or "3d"`}),e}class fg extends Xl{constructor(t){super(t,{}),this.implementation=t}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)}onRemove(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)}}var mg={paint:new ps({"sky-type":new ls(De.paint_sky["sky-type"]),"sky-atmosphere-sun":new ls(De.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new ls(De.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new ls(De.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new ls(De.paint_sky["sky-gradient-radius"]),"sky-gradient":new ds(De.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new ls(De.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new ls(De.paint_sky["sky-atmosphere-color"]),"sky-opacity":new ls(De.paint_sky["sky-opacity"])})};function vg(t,e,i){const r=[0,0,1],n=eu([]);return ru(n,n,i?-l(t)+Math.PI:l(t)),iu(n,n,-l(e)),Fc(r,r,n),Lc(r,r)}class _g extends Xl{constructor(t){super(t,mg),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){"sky-gradient"===t?this._updateColorRamp():"sky-atmosphere-sun"!==t&&"sky-atmosphere-halo-color"!==t&&"sky-atmosphere-color"!==t&&"sky-atmosphere-sun-intensity"!==t||(this._skyboxInvalidated=!0)}_updateColorRamp(){const t=this._transitionablePaint._values["sky-gradient"].value.expression;this.colorRamp=Eu({expression:t,evaluationKey:"skyRadialProgress"}),this.colorRampTexture&&(this.colorRampTexture.destroy(),this.colorRampTexture=null)}needsSkyboxCapture(t){if(this._skyboxInvalidated||!this.skyboxTexture||!this.skyboxGeometry)return!0;if(!this.paint.get("sky-atmosphere-sun")){const e=t.style.light.properties.get("position");return this._lightPosition.azimuthal!==e.azimuthal||this._lightPosition.polar!==e.polar}return!1}getCenter(t,e){if("atmosphere"===this.paint.get("sky-type")){const i=this.paint.get("sky-atmosphere-sun"),r=!i,n=t.style.light,o=n.properties.get("position");return r&&"viewport"===n.properties.get("anchor")&&V("The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly."),r?vg(o.azimuthal,90-o.polar,e):vg(i[0],90-i[1],e)}const i=this.paint.get("sky-gradient-center");return vg(i[0],90-i[1],e)}is3D(){return!1}isSky(){return!0}markSkyboxValid(t){this._skyboxInvalidated=!1,this._lightPosition=t.style.light.properties.get("position")}hasOffscreenPass(){return!0}getProgramIds(){const t=this.paint.get("sky-type");return"atmosphere"===t?["skyboxCapture","skybox"]:"gradient"===t?["skyboxGradient"]:null}}const gg={circle:pu,heatmap:Au,hillshade:Su,fill:Ed,"fill-extrusion":vp,line:Hp,symbol:lg,background:cg,raster:dg,sky:_g};function yg(t){return"custom"===t.type?new fg(t):new gg[t.type](t)}class xg{constructor(t,e,i,r){this.context=t,this.format=i,this.texture=t.gl.createTexture(),this.update(e,r)}update(t,i,r){const{width:n,height:o}=t,{context:a}=this,{gl:s}=a,{HTMLImageElement:l,HTMLCanvasElement:h,HTMLVideoElement:c,ImageData:u,ImageBitmap:d}=e;if(s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!i||!1!==i.premultiply)),r||this.size&&this.size[0]===n&&this.size[1]===o){const{x:e,y:i}=r||{x:0,y:0};t instanceof l||t instanceof h||t instanceof c||t instanceof u||d&&t instanceof d?s.texSubImage2D(s.TEXTURE_2D,0,e,i,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,e,i,n,o,s.RGBA,s.UNSIGNED_BYTE,t.data)}else this.size=[n,o],t instanceof l||t instanceof h||t instanceof c||t instanceof u||d&&t instanceof d?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,n,o,0,this.format,s.UNSIGNED_BYTE,t.data);this.useMipmap=Boolean(i&&i.useMipmap&&this.isSizePowerOfTwo()),this.useMipmap&&s.generateMipmap(s.TEXTURE_2D)}bind(t,e){const{context:i}=this,{gl:r}=i;r.bindTexture(r.TEXTURE_2D,this.texture),t!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.useMipmap?t===r.NEAREST?r.NEAREST_MIPMAP_NEAREST:r.LINEAR_MIPMAP_NEAREST:t),this.filter=t),e!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,e),this.wrap=e)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}class bg{constructor(t,e){this.width=t,this.height=e,this.nextRow=0,this.image=new zu({width:t,height:e}),this.positions={},this.uploaded=!1}getDash(t,e){const i=this.getKey(t,e);return this.positions[i]}trim(){const t=this.width,e=this.height=P(this.nextRow);this.image.resize({width:t,height:e})}getKey(t,e){return t.join(",")+e}getDashRanges(t,e,i){const r=[];let n=t.length%2==1?-t[t.length-1]*i:0,o=t[0]*i,a=!0;r.push({left:n,right:o,isDash:a,zeroLength:0===t[0]});let s=t[0];for(let e=1;e1&&(s=t[++a]);const l=Math.abs(n-s.left),h=Math.abs(n-s.right),c=Math.min(l,h);let u;const d=e/i*(r+1);if(s.isDash){const t=r-Math.abs(d);u=Math.sqrt(c*c+t*t)}else u=r-Math.sqrt(c*c+d*d);this.image.data[o+n]=Math.max(0,Math.min(255,u+128))}}}addRegularDash(t,e){for(let e=t.length-1;e>=0;--e){const i=t[e],r=t[e+1];i.zeroLength?t.splice(e,1):r&&r.isDash===i.isDash&&(r.left=i.left,t.splice(e,1))}const i=t[0],r=t[t.length-1];i.isDash===r.isDash&&(i.left=r.left-this.width,r.right=i.right+this.width);const n=this.width*this.nextRow;let o=0,a=t[o];for(let i=0;i1&&(a=t[++o]);const r=Math.abs(i-a.left),s=Math.abs(i-a.right),l=Math.min(r,s),h=(a.isDash?l:-l)+e;this.image.data[n+i]=Math.max(0,Math.min(255,h+128))}}addDash(t,e){const i=this.getKey(t,e);if(this.positions[i])return this.positions[i];const r="round"===e,n=r?7:0,o=2*n+1;if(this.nextRow+o>this.height)return V("LineAtlas out of space"),null;0===t.length&&t.push(1);let a=0;for(let e=0;e{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._callback()}),0))}remove(){this._channel=void 0,this._callback=()=>{}}}class zg{constructor(){this.tasks={},this.taskQueue=[],D(["process"],this),this.invoker=new wg(this.process),this.nextId=0}add(t,e){const i=this.nextId++,r=Mg(e);if(0===r){q();try{t()}finally{}return{cancel:()=>{}}}return this.tasks[i]={fn:t,metadata:e,priority:r,id:i},this.taskQueue.push(i),this.invoker.trigger(),{cancel:()=>{delete this.tasks[i]}}}process(){q();try{if(this.taskQueue=this.taskQueue.filter((t=>!!this.tasks[t])),!this.taskQueue.length)return;const t=this.pick();if(null===t)return;const e=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),!e)return;e.fn()}finally{}}pick(){let t=null,e=1/0;for(let i=0;i